Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Docker image construction and export save, import load

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Lead: build a local image through commit, save the image in save, and load the image in load

1. Build an image through commit

[root@env-lab] # docker commit-p web1

-p: indicates that during the process of building an image, the container is paused, web1 is the container object being built, and the container running with the name web1 is packaged as an image

2. View the built image. The built image does not have a repository name and tag.

3. Add the warehouse name and tag for the image, and re-view the image

4. Package and save the image to the local linux root directory

[root@env-lab] # docker save-o myimages.gz scxiang/nginx scxiang/httpd

5. View the file locally

6. Copy the file to the target host through scp, and load it, and then you can see the imported image file.

[root@env-lab] # docker load-I myimages.gz

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.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report