title: Docker mount not working...what am I missing here?
body: <p>My Dockerfile looks like follows;</p>
  
  <pre><code>FROM python:2.7
  COPY . /temp
  WORKDIR /temp
  CMD ["python", "app.py", "100"]
  </code></pre>
  
  <p>My Python file looks like this,</p>
  
  <pre><code>import sys
  print "This is the name of the script: ", sys.argv[0]
  print "Number of arguments: ", len(sys.argv)
  print "The arguments are: " , str(sys.argv)
  file = open("log.log", "a")
  
  x = int(sys.argv[1])
  print "received value of x is: ", x
  
  if x &lt; 100:
      file.write('entered value is less than 100: Exiting with exit code 0; SUCEESS')
  elif x == 100:
      file.write('entered value is equal to 100: Exiting with exit code 1; SUCEESS')
  else:
      file.write('entered value is more than 100: Exiting with exit code 2; FAILED')
  </code></pre>
  
  <p>The way I build this container is as follows:
  <code>docker build python-container .</code></p>
  
  <p>The way I run the container is as follows:
  <code>docker run -v ~/logs/:app python-container</code></p>
  
  <p>What I want is to mount the container directory in which log in generated to my host so that the log file generated by the python is available on my host computer.</p>
  
  <p>But unfortunately, this is not happening,</p>
  
  <p>Debug done by me:</p>
  
  <ol>
  <li><p>I initially used the python in ENTRYPOINT but it seems the commands in ENTRYPOINT are compressed and bundled in the container and then the container is mounted and thus it failed.</p></li>
  <li><p>I kept the container running forever by using the <code>ENTRYPOINT ["tail", "-f", "/dev/null"]</code> but still it failed.</p></li>
  <li><p>I also used docket volumes, created volumes, mounted them and then run the containers and still the log is not available outside.</p></li>
  </ol>
  
  <p>My question here is what am I missing?</p>
  
  <p>Ultimately, my aim is to have different containers running different python jobs and generating different log files in a specific directory on my host...</p>
  
  <p>I would really appreciate any help in this matter...</p>