In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains "how to export and import docker container". The content of the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn how to export and import docker container.
1. Export container
If you want to export a local container, you can use the docker export command to export the container snapshot to a local file.
$sudo docker ps-aCONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES7691a814370e ubuntu:14.04 "/ bin/bash" 36 hours ago Exited (0) 21 hours ago test$ sudo docker export 7691a814370e > ubuntu.tar
2. Import container snapshots
You can use docker import to import as a mirror from a container snapshot file, for example
$cat ubuntu.tar | sudo docker import-test/ubuntu:v1.0$ sudo docker imagesREPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZEtest/ubuntu v1.0 9d37a6082e97 About a minute ago 171.3 MB
Alternatively, you can import it by specifying URL or a directory, such as
The copy code is as follows:
$sudo docker import http://example.com/exampleimage.tgz example/imagerepo
* Note: users can use docker load to import image storage files to the local image library, or docker import to import a container snapshot to the local image library. The difference between the two is that the container snapshot file will discard all history and metadata information (that is, only save the snapshot state of the container at that time), while the mirror storage file will keep the full record and be large. In addition, metadata information such as labels can be reassigned when importing from a container snapshot file.
Thank you for your reading, the above is the content of "how to export and import docker container". After the study of this article, I believe you have a deeper understanding of how to export and import docker container. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.