Skip to content
Opsfolk

Running containers, topic 27 of 41

Configuration at run time

Build one image and configure it when it runs, so the same image goes from test to production. Pass settings as environment variables with -e or --env-file, or as arguments after the image's name, which replace its CMD.

Keep secrets out of the image and out of ENV in a Dockerfile: anyone who can pull the image can read them. docker inspect shows a container's variables, so a real secret belongs in a file mounted at run time.

On Opsfolk

Nothing of ours for this topic yet: an article is on its way.

Elsewhere

Your progress