Craft in a container - sans DB
1.3K
(In the same folder as your source code):
FROM darrencrossley/craftcms:latest
COPY ./src/config /var/www/craft/config
COPY ./src/plugins /var/www/craft/plugins
COPY ./src/templates /var/www/craft/templates
COPY ./html /var/www/html
Your source code folder should have a html folder for public apache data and a src folder for craft data.
Mount volumes in the master image
e.g.
docker run -d -P --name crafty-site -v src/templates:/var/www/craft/templates -v src/config:/var/www/craft/config -v src/plugins:/var/www/craft/plugins -v html:/var/www/html darrencrossley/craftcms
You can now work locally while running a (more or less) production env.
Build your image using the above docker file snippet
if you use the bundled config you can set:
DB_HOST DB_NAME DB_PASS DB_PORT DB_USER
A lot.
Some kind of shared session handling would be good.
It also relies on an external database.
It probably wont work for you.
Content type
Image
Digest
Size
321.4 MB
Last updated
over 8 years ago
docker pull darrencrossley/craftcms