title: How to docker cp correctly?
body: <p>I am trying to copy a file from my host to my container. I have already checked out many threads but neither of those work out for me.</p>
  
  <p>File name, I'm trying to copy: <strong>ex.txt</strong></p>
  
  <p>Container folder where it needs to be: <strong>my_folder</strong></p>
  
  <pre><code>user:~$ docker exec -it my_container bash
  a5b13d9a55fd:~S ls
  my_folder
  </code></pre>
  
  <p>What I have tried so far:</p>
  
  <pre><code>user:~$ docker cp ex.txt my_container:/my_folder/
  no such directory
  
  user:~$ docker cp ex.txt my_container:/my_folder/ex.txt
  Error response from daemon: lstat /var/lib/docker/aufs/mnt/f7796d886aa3673be37b1d346190b7d6ba0ed64edf83bf62bff325f87eaec5eb/my_folder: no such file or directory
  </code></pre>
  
  <p>Please suggest where am I missing the code?</p>