I have been using Grav for a while now, running on my own docker image thought I would share if anyone is interested, please raise issues for features / bugs. I will try my best in spare time to fix anything.
What is dsavell/grav?
A Docker image based on minideb:stretch linux with Grav CMS and PHP7.3/nginx.
- php7.3 + FPM
- GRAV Core
- GRAV Admin Plugin
docker create \ --name=grav \ --restart unless-stopped \ -p 80:80 \ -e DUID=1000 \ -e DGID=1000 \ -v /data/containers/grav/backup:/var/www/grav/backup \ -v /data/containers/grav/logs:/var/www/grav/logs \ -v /data/containers/grav/user:/var/www/grav/user \ dsavell/grav docker start grav
[latest, core, 1.6.11, core-1.6.11]
You can choose between ,using tags, no tag is required for grav default installation.
Add one of the tags, if required:
- Example: dsavell/grav:admin
- latest: GRAV Core
- admin: GRAV Core + Grav-Admin-Plugin
Container images are configured using parameters passed at runtime (such as those above). These parameters are separated by a colon and indicate
<external>:<internal> respectively. For example,
-p 8080:80 would expose port
80 from inside the container to be accessible from the host’s IP on port
8080 outside the container.
||for UserID - see below for explanation|
||for GroupID - see below for explanation|
||Contains your location for Grav backups|
||Contains your location for your Grav log files|
||Contains your Grav content|
User / Group Identifiers
When using volumes (
-v flags) permissions issues can arise between the host OS and the container, we avoid this issue by allowing you to specify the user
DUID and group
Ensure any volume directories on the host are owned by the same user you specify and any permissions issues will vanish like magic.
In this instance
DGID=1000, to find yours use
id user as below:
$ id username uid=1000(dockeruser) gid=1000(dockergroup) groups=1000(dockergroup)
Accessing the application
Access the webui at
Using the container
- Shell Access to container when it is running:
docker exec -it grav /bin/bash
18/06/2019: The Better Release?
- Better File/Volume control
- Better tagging / versioning of GRAV Core.
- Better User/Group management.
- Better Documentation.
10/06/2019: The Refactor Release
- Converted to minideb for better package management.
- Updated to PHP 7.3.
- Better logic to pull latest version when building.
- Better logging.
- blog image removed.
- GRAV Core & GRAV Core + Admin Plugin only images for now.
- Smaller Docker layering.
- Fixed nginx configuration thanks to [esapy]
10/04/2018: The Volume Release
- The /var/www volume can now be mounted.
02/01/2018: The 2018 Release
- Improved Code
- Now using github API to pull latest GRAV release
27/07/2017: The Automated Release
- Updated tag “blog” to now use github API to download latest Blog-Skeleton zip file
- Improved code on all tags
- Typo corrections on the README.md
29/06/2017: The Blog Release
- added tag blog This is a skeleton of Blog-Skeleton
28/06/2017: The Even Smaller Release
- Now uses image from ej52/alpine-nginx-php
- Size has reduced from 657 to 267mb & with admin plugin 277mb
22/06/2017: The Better Release
- Now uses image from php:7.0-apache
- Size has reduced from 1.2gb to 657mb & with admin plugin 682mb
- Corrected GRAV permissions
- Less packages installed during Docker build + cleanup
21/06/2017: Initial Release
- First Initial Release
- No Optimization
- Full Operating System of centos used
- No Custom Features