copy files from a docker container to the host machine using cmd
docker cp <containerId>:/file/path/within/container /host/path/target
Source: stackoverflow.com
docker copy from container to host
# container to host ocker cp <containerId>:/file/path/within/container /host/path/target # host to container docker cp /host/local/path/file <containerId>:/file/path/in/container/file
Source: mkyong.com
copy file from host to docker container
docker cp foo.txt mycontainer:/foo.txt
Source: stackoverflow.com
copy a file from local machine to docker container
docker cp <Path in the local machine> <Container ID>:<Path of file inside the container>
Source: www.tutorialspoint.com
docker copy file from container to host
$ docker run -d --name httpd httpd $ docker exec httpd pwd /usr/local/apache2 $ docker exec httpd ls bin build cgi-bin conf error htdocs icons include logs modules $ docker cp httpd:/usr/local/apache2/conf .
Source: stackoverflow.com