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