Skip to content

Techeons

Imagine | Explore | Innovate

Menu
  • Home
Menu

Managing Docker images as a tar file

Posted on September 15, 2024

As an alternative to managing Docker images using a Docker Registry, you can also manage it as a tar file.

Managing Docker images as tar files allows you to:

  1. Save docker images as a file
  2. Load images from a file
  3. Share images without a registry: Share the tar file instead of pushing to a registry
  4. Backup images: Regularly save images to tar files for safekeeping
  5. Migrate images: Move images between systems by loading the tar file

Docker Commands:

Save an image to a tar file:

docker save -o image.tar image_name

Save an image to a tar file using pigz compression:

docker save my_image | pigz > my_image.tar.gz
pigz is a parallel implementation of gzip that can significantly speed up compression.

Load an image from a tar file:

docker load -i image.tar

Load an image from a tar file using pigz decompression:

pigz -dc my_image.tar.gz | docker load

Import a tar file as a new image:

docker import image.tar new_image_name

Import an image from a tar file using pigz decompression:

pigz -dc image_name.tar.gz | docker import - image_name
Share on Social Media
x facebook pinterest linkedin tumblr reddit emailwhatsapptelegrammastodon

Leave a Reply Cancel reply

You must be logged in to post a comment.

Recent Posts

  • Nginx: How to increase timeout for Nginx
  • Cheat Sheet: Essential Git Commands
  • Setting a default shell in Linux
  • Setting up Composer on Linux
  • Switch easily between Python versions on a Mac using pyenv

Tags

ai alerting aws b2 backblaze certificate cheatsheet cloud commands data-science datalake devops dns docker dremio git gitlab infra jenkins kubernetes linux metabase minikube minio monitoring mount mysql nginx nodejs notebooks openssh php python scala secrets spark ssh ssl ubuntu ufw usb web dev tools windows xampp zeppelin

©2026 Techeons | Design: Newspaperly WordPress Theme