This article introduces the import and export of Docker images, which are used in scenarios such as migration, backup, and upgrade. The environment is prepared as follows:
Introduction to import and export commands The commands involved are export, import, save, load save Order Example The -o and > characters indicate output to a file, load Order Example -i and < indicate input from a file. The image and related metadata, including tag information, will be successfully imported export Order Example import Order Example The difference is that the tar file exported by the export command is slightly smaller than that exported by the save command. The export command exports a tar file from a container, while the save command exports from images. Based on the second point, when the exported file is imported back, the entire history of the image (that is, the information of each layer, if you are not familiar with it, you can read Dockerfile) cannot be retained, and rollback operations cannot be performed; save is based on the image, so the information of each layer can be completely retained when importing. As shown in the following figure, suggestion You can choose commands based on specific usage scenarios If you just want to back up images, use save and load. If the container content changes after starting the container and needs to be backed up, use export and import The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM. You may also be interested in:
|
<<: Vue mobile terminal realizes the whole process of left sliding editing and deletion
>>: Ways to improve MongoDB performance
After entering yum in linux, the prompt: -bash: /...
Two cases: 1. With index 2. Without index Prerequ...
Without further ado, I'll go straight to the ...
Table of contents 1. Introduction to High Availab...
Related system calls for file operations create i...
Redis is an open source NoSQL database written in...
When I was looking at some CSS3 animation source ...
What is content overflow? In fact, when there is ...
Table of contents Preface The role of render Rend...
Which historical version can the current transact...
1. Components and implemented functions Keepalive...
Install Docker Desktop Download address: Docker D...
ngx_lua_module is an nginx http module that embed...
Closure implementation of private variables Priva...
Table of contents 1. Introduction 2. Self-increme...