(: August 29, 2019)

In this guide, we will look at how you can export and import Docker images and containers. Before you can export a Docker container, you need to commit the changes into an image and tag it appropriately. Docker has an export command which enables you to migrate Docker images / containers from one Docker host system to a different node.

In my Local Docker system, I have the following Docker images.

$ sudo docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
rook/ceph           master              d55319cc22f8        12 hours ago        852MB
ceph/ceph           v14.2.2-20190826    9bd6baa6e20a        7 days ago          774MB

Export Docker images

In the first exercise, we will export the Docker images as they are and move them to the second Node running Docker engine.

.td_uid_2_5d908af767305_rand.td-a-rec-img{text-align:left}.td_uid_2_5d908af767305_rand.td-a-rec-img img{margin:0 auto 0 0}
sudo docker save rook/ceph:master > rook-ceph.tar
sudo docker save ceph/ceph:v14.2.2-20190826 > ceph.tar

The docker save flag is used to save one or more images to a tar archive.

For running Docker containers, first create a new image from a container’s changes.

sudo docker commit --change "Added something" webapp webapp:v2
sudo docker save webapp:v2 > webapp_v2.tar

Where webapp is the name of container running.

Import Saved Docker images

Copy exported docker images archive to destination server, then import them using the docker import command.

$ sudo docker import rook-ceph.tar
Getting image source signatures
Copying blob 5f91d4a491de: 829.12 MiB / 834.23 MiB [===========================]
Copying blob 5f91d4a491de: 834.23 MiB / 834.23 MiB [=======================] 11s
Copying config dd85e44a0f8b: 419 B / 419 B [================================] 0s
Writing manifest to image destination
Storing signatures

Copy image ID and tag it properly.

 sudo docker tag 4e1a2b349b09 rook/ceph:master

There you have it. You have learned how to export and import Docker images and containers. until next time, stay connected for updated and check other Docker related content on our website.

Best Books To learn Docker and Ansible Automation

How To Install Harbor Docker Image Registry on CentOS / Debian / Ubuntu

How To Install Latest Docker Compose on Linux

How To run Local Kubernetes clusters in Docker

How To run Docker Containers using Podman and Libpod

.td_uid_4_5d908af767510_rand.td-a-rec-img{text-align:left}.td_uid_4_5d908af767510_rand.td-a-rec-img img{margin:0 auto 0 0}
  • How To Change Your cPanel Password
  • Bitcoin’s Price Volatility Just Hit Another 15-Month Low
  • Rebranding The DAO: The Contentious Blockchain Concept is Back
  • ViaBTC Rises: How A Mysterious Miner Could Decide Bitcoin’s Future
  • How to find Intel NUC BIOS version and model on Linux
  • Litecoin Price Surges to New All-Time High Over $60
  • Have We Reached Peak Blockchain Hype?
  • Credit Card Giant MasterCard Files 4 New Blockchain Patents
  • SSH Key Setup for GitHub
  • Brave Offers First Bitcoin Micropayments to Publishers
  • Monitor HTTP Packets ( packet sniffing )
  • How to shutdown / reboot the remote Linux server from the CLI
  • CME Group’s Leo Melamed: We’ll ‘Tame’ Bitcoin
  • North Korea Hacking Crypto Exchanges to Circumvent Sanctions: UN Panel
  • How to Remote Desktop Connection using xRDP CentOS 7 Server
  • SXI LLC Company
    SXI.IO is a global Blockchain software company, specialized in developing white label crypto exchange platforms , Wallet platforms, ICO platforms, Token Erc20 .....
    Fully Managed VPS Fully Managed VPS Fully Managed VPS

    You Might Also Enjoy NewS Post

    Best Free Web Hosting 2020

    Free Hosting 1GB $0.00 USD/mo Disk space 1GB Traffic 10GB/Month Domains 2 Plesk Cpanel Databases 10 Free 12 Month https://my.sxi.io/cart.php?a=add&pid=196

    02/05/2020 READ MORE