https://github.com/james-nesbitt/wunder-docker
This is a set of service and command Docker container images, that can be used together to provide common web service, with a focus on Drupal.
The base image is used as a FROM for other Wunder images. This image provides a standardization for user usage, and source code location, for our approach to build a containerized apps.
There are certain problems that we were running into when splitting an application across various containers:
So the solution was:
The following standardizations were used:
Standard paths:
Standard users were create:
Using this approach, it becomes easy to:
And results in extra bonuses like:
Using this base image, it becomes easy to implement separated applications, without needing to re-use binds, and with good privilege separation, and sharing of files.
Consider creating a container that will hold source, perhaps in /app/src or /app/www : this then gives a bind source for other containers. Such an approach is easily repeatable in production and local environments, where local environments can use a host bind, and production environments can build a container using something like a git clone. Consider only ever binding this as Read-Only.
Consider creating a container based on this image, that will contain volumes for non-architecture files such as assets, caches, renders or compiles. This container can be volatile, or can be considered a central file repository for various application components.
(remember that it is easy to mount all container volumes to another container using --volumes-from my_container, in the Docker run)
3 interchangeable FPM servers