Skip to content

Docker image persistence

Docker image persistence is the process of saving a Docker image to a file archive to ensure it can be stored, transferred, or reloaded later. This is typically achieved using the docker save command^[600-developer__docker__docker-tomcat.md].

Commands

The primary command for persisting an image is docker save.^[600-developer__docker__docker-tomcat.md]

  • List images: First, identify the image using docker images^[600-developer__docker__docker-tomcat.md].
  • Save to tar: Use the redirect operator to save the image to a specific file path^[600-developer__docker__docker-tomcat.md].
    • Example syntax: docker save busybox-1 > /home/save.tar^[600-developer__docker__docker-tomcat.md].
  • Load image: To restore a persisted image, use the docker load command with the target tar file^[600-developer__docker__docker-tomcat.md].
  • [[Container persistence]]
  • [[Docker CLI]]

Sources

  • 600-developer__docker__docker-tomcat.md