Facebook Twitter Instagram
    TecAdmin
    • Home
    • Ubuntu 20.04
      • Upgrade Ubuntu
      • Install Java
      • Install Node.js
      • Install Docker
      • Install LAMP Stack
    • Tutorials
      • AWS
      • Shell Scripting
      • Docker
      • Git
      • MongoDB
    • FeedBack
    • Submit Article
    • About Us
    Facebook Twitter Instagram
    TecAdmin
    Home»Linux Tutorials»How to Move Docker Images between Hosts

    How to Move Docker Images between Hosts

    RahulBy RahulMarch 3, 20162 Mins Read

    In our previous tutorials you have learned about installation of Docker engine on CentOS/RHEL and Ubuntu operating system and pulled images from Docker hub. After that created containers with images. This tutorial will help you to export and import Docker images and move them between hosts.

    List Docker Images

    Fist list docker images on your system using below command.

    [email protected]:~# docker images
    
    REPOSITORY     TAG        IMAGE ID            CREATED          VIRTUAL SIZE
    centos         latest     2933d50b9f77        11 days ago      196.6 MB
    ubuntu         latest     36248ae4a9ac        11 days ago      188 MB
    

    Save or Archive Image

    Now use the following command to save image repository named ubuntu (image id: 36248ae4a9ac) and make a zipped archive named ubuntu-latest.tar.gz. Remember that save is used for making backup of docker images (not containers).

    # docker save ubuntu | gzip > ubuntu-latest.tar.gz
    

    Import Image

    After saving docker image in archive format on your system move it to remote system using scp or ftp. After that use below command on remote system to import Docker image with name ubuntu and tag name latest.

    # zcat ubuntu-latest.gz | docker import - ubuntu:latest
    

    The above command will create a docker image with name ubuntu and tag name latest on your system. You can now launch containers using this image like below.

    # docker run -i -t ubuntu /bin/bash
    
    containers Docker Docker Images
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email WhatsApp
    Previous ArticleHow to Export and Import Docker Containers
    Next Article How to Search, Pull, List & Delete Docker Images on Linux

    Related Posts

    What is the /etc/aliases file

    2 Mins Read

    What is the /etc/nsswitch.conf file in Linux

    2 Mins Read

    How to Setup Squid Proxy Server on Ubuntu and Debian

    Updated:June 17, 20225 Mins Read

    How to Delete a Let’s Encrypt Certificate using Certbot

    Updated:June 3, 20222 Mins Read

    How to Install Latest Git on Ubuntu 22.04

    Updated:May 31, 20222 Mins Read

    How To Install LibreOffice on Ubuntu 22.04

    Updated:May 23, 20222 Mins Read

    1 Comment

    1. sam on March 4, 2016 6:43 am

      Its working for me.
      Thanks

      Reply

    Leave A Reply Cancel Reply

    Recent Posts
    • What is CPU? – Definition, Types and Parts
    • What is the /etc/aliases file
    • What is the /etc/nsswitch.conf file in Linux
    • How to Install Ionic Framework on Ubuntu 22.04
    • What is the /etc/hosts file in Linux
    Facebook Twitter Instagram Pinterest
    © 2022 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.