docker cp - "Error response from daemon: not a directory"

Viewed 22619

I am trying to copy file from docker to host using the below command,

docker cp <container_name>:<file FQN> ./

But getting the below error,

Error response from daemon: not a directory

As verified, the file name and container name are valid. Note: Using Docker in Mac

5 Answers

This error also appears when trying to copy a file that is actually a volume in the container, but the file has been deleted on the host.

Related