Docker image container Import and export

Source: Internet
Author: User

Record, save the future of their own old forget.


Ubuntu-14.04-x86_64.tar.gz is the downloaded template file, the import template file example below

[Email protected]:~# ll ubuntu-14.04-x86_64.tar.gz -rw-r--r-- 1 root root  154056446 may 17 10:04 ubuntu-14.04-x86_64.tar.gz[email protected]:~# cat  ubuntu-14.04-x86_64.tar.gz | docker import - ubuntu_template: v1b4ebc953c6f45c7be7d12bc226ad4fe445c97a9589bb714c31d205a7a9fcc686[email protected]:~# docker  imagesrepository              tag                  image id             CREATED              VIRTUAL SIZEubuntu_template          v1                   b4ebc953c6f4        43 seconds ago       415.7 mb


Image Export to Ubuntu_haha.tar

[Email protected]:~# docker save-o Ubuntu_haha.tar ubuntu:latest[email protected]:~# ll ubuntu_haha.tar-rw-r--r--1 root Root 197043712 10:03 Ubuntu_haha.tar


Image import, import the Ubuntu_haha.tar image into the name Ubuntu_haha:v1

[Email protected]:~# cat Ubuntu_haha.tar | Docker Import-ubuntu_haha:v18955fbb15571dd4621f270363238d8859fc6a5e2ee797b8267e86abdbc50f9f7


View the imported Mirrors

[Email protected]:~# docker imagesrepository TAG IMAGE ID CREATED VIRT UAL Sizeubuntu_haha v1 8955fbb15571 seconds ago 197 MB


Note: Image import can also use commands

Docker load < Ubuntu_haha.tar or Docker load--input Ubuntu_haha.tar




Container export, the ID of the bff3c385e273 container, the file name of the exported container Ubuntu_x1.tar

Docker Export bff3c385e273 > Ubuntu_x1.tar



Container import becomes mirror

Cat Ubuntu_x1.tar | Docker IMPORT-UBUNTU_X1:V1


This article is from the "Village Boys" blog, please make sure to keep this source http://noodle.blog.51cto.com/2925423/1774231

Docker image container Import and export

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.