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.

  • How to enable Redmines 'adding of issues' when using Docker?
  • docker tomcat directory not found?
  • Cannot receieve response from activemq when using docker
  • Docker inside Windows guest virtual machine
  • Link docker-compose to local docker daemon
  • Raspberry pi zero Docker can't start container
  • add PPA failed in Docker container
  • microservice in docker: service registered with private IP
  • Running GUI apps on docker container with a MacBookPro host
  • Docker Swarm, Compose V3 and exposed IP address
  • docker import data in mongodb successfull but nothing in database
  • Unable to run rabbitmq using marathon mesos
  • 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.