Question:
So, i’m trying not to put sensitive information on the dockerfile. A logical approach is to put the creds in the ebs configuration (the GUI) as a ENV variable. However, docker build doesn’t seem to be able to access the ENV variable. Any thoughts?
1 2 3 4 5 6 7 |
FROM jupyter/scipy-notebook USER root ARG AWS_ACCESS_KEY_ID RUN echo {$AWS_ACCESS_KEY_ID} |
Answer:
I assume that for every deployment you create a new Dockerrun.aws.json file with the correct docker image tag for that deployment. At deployment stage, you can inject environment values which will then be used in docker run
command by EB agent. So your docker containers can now access to these environment variables.