How to download file from docker container?

I'm using this Docker Container . 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.

1

2 Answers

Syntax to copy files/folders from docker container to local filesystem is

docker cp [OPTIONS] CONTAINER:SRC_PATH DEST_PATH|- 

Ex : 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 

Ex : docker cp ./localDir/dirToCopy b8ddea5d8fad:/mnt/newDir/

Docker Documentation here

You could use 'docker cp' command to retrieve particular files.

0

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like