How to download file from docker container?
I’m using this Docker Container https://github.com/tensorflow/tensorflow/tree/master/tensorflow/examples/udacity .
I’ve made few changes and would like to backup files from it to my hard drive. I can’t find solution to do so.
2 Solutions collect form web for “How to download file from docker container?”
You could use ‘docker cp’ command to retrieve particular files.
Syntax to copy files/folders from docker container to local filesystem is
docker cp [OPTIONS] CONTAINER:SRC_PATH DEST_PATH|-
docker cp b8ddea5d8fad:/mnt/mydir/ ./localDir
Syntax to copy files/folders from local filesystem to docker container is
docker cp [OPTIONS] SRC_PATH|- CONTAINER:DEST_PATH
docker cp ./localDir/dirToCopy b8ddea5d8fad:/mnt/newDir/
Docker Documentation here