james-nesbitt / wunder-docker

WILL BE RETIRED SOON: Docker boxes for the Wunder app/base based www service
1 stars 2 forks source link

Wunder-Docker

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:

  1. Standard paths:

    • /app is used as a root for all appication related files
    • /app is also a standard HOME for the default user
    • /app/logs should be used for service/application logs
  2. Standard users were create:

    • app (UID:1000, GID:1000) a standard privilege user who owns source code.
    • core (UID:500, GID:500) similar to the CoreOS core user, a higher privilege user
    • Any service that needs read access to source code should be added to the "app" group
    • The app user should be added to any container group which may produce files that are needed (such as log files)

Using this approach, it becomes easy to:

And results in extra bonuses like:

COMMON APPROACHES:

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.

(remember that it is easy to mount all container volumes to another container using --volumes-from my_container, in the Docker run)

Images

3 interchangeable FPM servers