Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Docker cp: Error response from daemon: lstat no such file or directory

I'm learning about containers docker, I'm still in the basics.. When I try to use the command docker cp,to copy an file from the container to the local host direcotory the output returns an error. I type:

docker cp bridge:/home/arq3.txt .

the output:

Error response from daemon: lstat /var/lib/docker/aufs/mnt/231afc03ee896d66b09ed3c4d1d057a73eeed4f6182c3108dcbfb5b3337c8fa5/home/arq3.txt: no such file or directory

Second the documentation of docker the syntax is right, so what I doing wrong? And what is this directory var/lib/docker/aufs/mnt/231afc03ee896d66b09ed3c4d1d057a73eeed4f6182c3108dcbfb5b3337c8fa5/?

like image 216
Douglas Dias da Silva Avatar asked Sep 02 '25 05:09

Douglas Dias da Silva


1 Answers

The error tells you that there is no file /home/arq3.txt in your Docker container. Check the file path. The file is probably not in /home but in /home/<user> or in /root.

As for /var/lib/docker/aufs/mnt/231afc03ee896d66b09ed3c4d1d057a73eeed4f6182c3108dcbfb5b3337c8fa5, it is the mount point of your Docker file hierarchy.

like image 121
xhienne Avatar answered Sep 04 '25 19:09

xhienne