Docker run time container config

One approach is to use a mandatory volume to store your conf files. If you want the users to edit the config files, provide a full description for it. You might want to mix it with the next approach.

Another approach is to prepare ENV variables for the environment specific configuration and render those in or more config files before you start the main process. Every ENV variable should be described, idealy with examples.

Cover docker run and docker-compose.yml style of desciptions. No one experienced in docker sticks to docker run, except for oneshot tests. If your application is design to run with multiple replicas, make sure to provide a docker-compose.yml that supports swarm deployments.

Make sure to design your image in a way that it doesn’t require a privleged user. Make sure to share the uid/gid of the user starting your main process in the dockerhub description.

1 Like