Closed hughbris closed 3 years ago
I use the git-sync plugin. I modified the Dockerfile to install git, and modified the init script to do a git clone using ENV vars for the repo/user/pass. This way the same container image can be called multiple times to pull up different sites in each container. git-sync commits everything in user
, which includes user/plugins
and user/themes
.
PHP libraries would need to be added to the Dockerfile.
Hello, will give some brief answers.
-v /data/containers/grav/user:/var/www/grav/user
Thanks @dsavell and apologies for not replying much sooner when I realised my request was misguided. This is indeed necessarily part of the build process and not an option at runtime. New image tags would be the only way to provide optional PHP libraries. These would be limited to common combinations and are not a proper parameterised solution.
I've been wanting for a while to be able to pass parameters to
docker run
ordocker-compose
that allow me to add PHP libraries (like sqlite) or Grav plugins/themes. Mostly the former.I guess this is more a docker image modification thing than something that can be added at runtime (container instantiation), but my understanding is limited and my attempts to research it have only added to my confusion. I'm yet to find good online Docker resources that address (what I assume) are common use cases like this.
Is there a way you know of? Otherwise I'm left with running my customisations in the container, or creating private image builds for each configuration I need (again, mostly a problem for PHP library packages).