title: How to get inside docker container to see the mounted volume?
body: <p>I am trying to buld a simple docker file that has a debian image.
  Also, I want to mount my local volume inside the docker container. 
  The problem I have is that how do I get inside the container to see the volume mounted.</p>
  
  <pre><code>$docker run -d -it bash --mount type=bind,source="$(pwd)",target=/app docker_test:latest
  43db16a76d50f1da0f8589c9ec460080ccef40122c9bc54abad3230dbbfe7885
  </code></pre>
  
  <p>I believe this 43db16a.. is container id. Even I try to attach to this container id  I get an an error message. It says you cannot attach to  the stop container. What am I missing here.</p>
  
  <p>It works if I do </p>
  
  <pre><code>docker run -d -it --name test_docker1 --mount type=bind,source="$(pwd)"/,target=/app docker_test:latest
  </code></pre>
  
  <p>and then </p>
  
  <pre><code>docker attach 
  d6bd3cc6dc667e742d0bb3c7fbec58935046c1bf7a2e0b6806d48817082c05be
  </code></pre>
  
  <p>Also, it works when I do </p>
  
  <pre><code>$docker run  --rm -ti   --mount type=bind,source="$(pwd)"/,target=/app docker_test:latest
  </code></pre>