Managing config (and secrets) in Docker builds

Obligatory picture of shipping containers, because Docker.

Keypad

One solution is to run a small webserver which your Dockerfile can query to get those secrets. No environment variables or secrets hidden in docker layers to worry about.

docker run -d -p 80:80 outstack/keypad
curl --fail -X PUT http://127.0.0.1:80/secret/key -d "new secret"
# in your DockerfileARG KEYPAD
RUN
curl --silent --fail "http://${KEYPAD}/secret/key"

--

--

PHP developer. http://t.co/olQvZ91Lo4

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store