Docker images for grav and skeletons

Hi, I know there is the PR about docker and docker-compose and there are at least a dozen other grav images on docker hub, but I still thought mine would be worth mentioning.

The framework for the Dockerfile came from https://github.com/lead4good/docker-grav/tree/master/1.2/apache I adjusted it slightly in order to install the 2 plugins which are essential for my deployments (admin, git-sync) and extended it to accommodate different skeletons. If some really cool skeleton is missing, it’s easy to add.

When you go to https://hub.docker.com/r/pgrm/grav/tags/ you’ll see over 20 different tags to start with grav right away. If you want a different skeleton dockerized, just create an issue on the repository or drop a line here. I’d be also super happy if the grav team would provide something like that, but I understand if this doesn’t align with their vision on grav and keeping it up to date is always a hassle.

Anyhow, I just wanted to share it, because I believe it’s a great way to start with one of those grav skeletons locally on your machine, without too many requirements (just run docker).

4 Likes

Hey there,

Thanks so much for posting this. Your repo was actually the one that has worked the best for me thus far.

I had one question - if I were to want just my /users/ directory look for a local dir on my host - is that possible?

Having a bit of trouble setting a volume in my docker-compose.yml

It seems to replace the entire /var/www/html directory with an empty /user/ directory

here is the docker-compose.yml file:
version: '3’
services:

        grav:
        build: .
        image: grav
        container_name: gravdocker
        ports:
          - "8080:80"
        environment:
          VIRTUAL_HOST: gravlocal.docker
        volumes:
          - ${PWD}/user:/var/www/html/user

Oh my goodness finally. A truly sane Grav development situation.

Someone give @pgrm a gold medal!!! https://hub.docker.com/r/pgrm/grav/tags/ is the single most useful util for quickly trying out skeletons… something I’d struggled with for a really long time “correctly” pairing a skeleton git repository (i.e. the user folder) with a dockerized bare Grav release. This removes all that hassle with dockerized skeletons that “just work”.

Very excited to dig into these, and try out the git-sync paradigm.
One question:
Does your workflow use Volumes at all to persist state for the “user” folder? Perhaps this is fulfilled by git-sync. Haven’t dug in yet.

Good work!

1 Like