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.

  • Deploy changes to Docker container using Jenkins
  • Docker compose, running containers in net:host
  • How to properly launch an OpenShift v3 app
  • Shared, ephemeral read-only Docker volume
  • Kubernetes pod running out of memory when writing to a volume mount
  • Running VirtualBox in Ubuntu in Mac OSX, won't start up
  • Docker in docker on AWS Elastic Beanstalk
  • Docker instance cannot run images anymore and unable to reclaim free space
  • Docker install memcached
  • Understanding Mounted Directories with Fig and Docker
  • Private environment variables when deploying with Docker on AWS Elastic Beanstalk
  • Cgroups report weird cpu and memory usage
  • 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


    Ex : docker cp b8ddea5d8fad:/mnt/mydir/ ./localDir

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


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

    Docker Documentation here

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.