title: How do I run an nginx reverse proxy container on ECS using arguments
body: <p>I have a slightly modified version of the container here:</p>
  
  <p><a href="http://jasonwilder.com/blog/2014/03/25/automated-nginx-reverse-proxy-for-docker/" rel="nofollow">http://jasonwilder.com/blog/2014/03/25/automated-nginx-reverse-proxy-for-docker/</a></p>
  
  <p>To run it locally I use:</p>
  
  <pre><code>$ docker run -d -p 80:80 -v /var/run/docker.sock:/tmp/docker.sock -t jwilder/nginx-proxy
  </code></pre>
  
  <p>And run my other containers similar to below:</p>
  
  <pre><code>$ docker run -e VIRTUAL_HOST=my-domain.local -t -d my-repo/site-name
  </code></pre>
  
  <p>I'm having trouble converting this to a Task Definition on ECS.</p>
  
  <p><strong>Task definition</strong></p>
  
  <p>I have two containers:</p>
  
  <p>nginx-reverse-proxy</p>
  
  <ul>
  <li>Port mappings: Host 80 Container 80</li>
  <li>Essential: true</li>
  <li>Command: /app/docker-entrypoint.sh</li>
  </ul>
  
  <p>static-site</p>
  
  <ul>
  <li>Port mappings: Host 5000 Container 5000</li>
  <li>Essential: false</li>
  <li>Command: /some-file.sh</li>
  <li>Env vars: VIRTUAL_HOST static.example.com</li>
  </ul>
  
  <p>I have a cluster with one ECS instance and a server with one task, defined above. This keeps cycling and fails with "STOPPED (Essential container in task exited)".</p>
  
  <p>Now I assume I need to setup volumes but all the examples I can find have a path and a name and I can't see how I can convert this "/var/run/docker.sock:/tmp/docker.sock" into any fields available.</p>