title: Pass ENV in docker run command
body: <p>Is there a way we can pass a variable lets say in this example I want to pass a list of animals into an entrypoint.sh file using <code>ENV animals="turtle, monkey, goose"</code></p>
  
  <p>But I want to be able to pass different animals when running the container for example <code>docker run -t image animals="mouse,rat,kangaroo"</code></p>
  
  <p>How do you go about passing arguments when running the docker run command?</p>
  
  <p>The goal is to take that variable when using the docker run command and insert them into that entrypoint.sh file</p>
  
  <p>Right now i hard code that in my Dockerfile.  But i want to be able to do this when running the docker run command so I dont always have to change the Dockerfile.</p>
  
  <pre><code>FROM anapsix/alpine-java:8u121b13_jdk
  
  ENV FILE_NAME="file_to_run.zip"
  
  ENV animals="turtle, monkey, goose"
  
  ADD ${FILE_NAME} .
  
  RUN echo "${FILENAME} ${animals}" &gt; ./entrypoint.sh    
  
  CMD [ "/bin/ash", "./entrypoint.sh" ]
  </code></pre>