0

I am trying to pass some variables to run my docker container. I have this in my dockerfile

#base stuff here
CMD ["echo", "$ENV"]

The output I get is this

$ENV

I am running my container like this

docker run -e ENV='hello' imagename

Why is it printing out $ENV and not my variable? If I start an interactive bash session then it will print out my variable but it through this way.

chickenman
  • 728
  • 2
  • 9
  • 29

0 Answers0