title: Mounted host file becomes a directory inside a docker container
body: <p>I mount a host file into a docker container, and the mounted file becomes a directory inside the container. That's how I run it:</p>
  
  <pre><code>$ docker run --name &lt;containername&gt; -it -d -v /home/core/account_config.py:/code/account_config.py  &lt;imagename&gt;
  </code></pre>
  
  <p>Inside the container:</p>
  
  <pre><code>    # ls -la
      -rw-r--r--. 4 root root     0 Nov  6 10:25 __init__.py
      drwxr-xr-x. 2 root root  4096 Nov  6 10:59 account_config.py
      ....
  </code></pre>
  
  <p>The file (in the host file system) is still a perfectly ok python file.  </p>
  
  <p>The source code is added into <code>/code</code> during build. The corresponding line in my Dockerfile is:</p>
  
  <pre><code>ADD ./code /code
  </code></pre>
  
  <p>I want to be able to change the content of config file without rebuilding the image, so I want mount it later.
  What went wrong and how can I fix this?</p>