Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

docker

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

like image 702
Kannan Ramamoorthy Avatar asked Jul 13 '17 19:07

Kannan Ramamoorthy


1 Answers

Thanks for all the answers. After a bit of struggle found out that the error message was not actually directly related to the docker cp command.

The scenario was, I ran the docker with the link to a local file. When the docker was running I deleted it. Then the file got created as a folder somehow (Probably, when I restarted the docker).

And whenever I am executing some command, the docker was giving me that error. Then once I created the file the error disappeared.

like image 82
Kannan Ramamoorthy Avatar answered Sep 21 '22 12:09

Kannan Ramamoorthy