title: Need to convert this relatively simple docker pull and run commands into a docker-compose.yml file?
body: <p>I have three commands that I am using to "update","re-run", and then "clean up" my current docker image via our CI tool of choice (Jenkins). I'm not including my "container stop and remove" commands for simplicity's sake.</p>
  
  <pre><code>docker pull my.private.registry:443/my-awesome-app
  
  docker run -d --env-file ./env.list -i -p 8080:8080 -p 9990:9990 my.private.registry:443/my-awesome-app
  
  docker rmi $(docker images -f "dangling=true" -q)
  </code></pre>
  
  <p>I'm new to docker-compose and I understand that most of these pull/run steps could probably be done within a docker-compose.yml file. I'm hoping someone with experience in this can show me an example, because the ones I've found seem to diverge a bit from my needs.</p>
  
  <p>Also, will docker-compose give me a better way to pass in my environment variables than the method listed?</p>
  
  <p>env.list is a list of environment variables I pass to the container. This seems to work, but I notice that doing a docker inspect ${CONTAINER_ID} reveals the variable value I passed in. I feel like this kind of defeats the purpose of extracting the values from the config files in the first place.</p>