Docker Community Forums

Share and learn in the Docker community.

Copy file from container to host

HI,
I have deployed one application in container.
The application needs download one file from other server, and then copy the file to host directory.
I try the below command, but i get error:
“cp: cannot create regular file ‘/home/ubuntu/DestFIlePath/MyFile.txt’: No such file or directory”

Command:
cp containerID:/ContainerFilePath/MyFile.txt /home/ubuntu/DestFIlePath/MyFile.txt

Anyone know what is the correct ‘Path’ for host when inside one container?

Thanks for any solution.