How to backup/restore docker image for deployment?

I have an image to be updated with following command before each deployment.

$docker pull myusername/myproject:latest

This command overwrites the previous image.
How can I backup this image (or change it to a different tag locally without committing to networking repository? If there is anything wrong, I can restore the backup.

  • API design - splitting into different sub-domains (micro-services)
  • Dockerfile RUN command taking a lot of disk space
  • docker with shared folder d drive
  • Assign different public IPs to different Docker container
  • Not able to run tomcat container in kubernetes after exposing it as a service
  • Docker for mac hostname insteat of IP
  • Docker volume is empty for jenkins compose file, not copying any files
  • How I can run docker containers on the remote host?
  • How do I set the AWS Autoscaler to use the same IP addresses?
  • Using Ansible docker_container, how can I display standard out? (stdout)
  • Docker Ubuntu update-alternatives
  • Integrating Docker into the existing TFS-based infrastructure (not web-apps) [closed]
  • One Solution collect form web for “How to backup/restore docker image for deployment?”

    How can I backup this image

    Simply use the docker save command. $ docker save myusername/myproject:latest | gzip -c > myproject_img_bak20141103.tgz

    You will later be able to restore it with the docker load command. gunzip -c myproject_img_bak20141103.tgz | docker load


    or change it to a different tag locally without committing to networking repository?

    Use the docker tag command: $ docker tag myusername/myproject:latest myusername/myproject:bak20141103

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