1. Use docker images to view all the image files on this machine 2. docker save eb40dcf64078> /root/mydjango-save-1016.tar Save the image as a local file, where eb40dcf64078 is the image id 3. Upload the files saved locally to the server that cannot be pulled. The network is connected. I use the scp command directly here. 4. Use the load method to load the tar file just uploaded
5. Use the docker images command on the new machine to view the local image and check whether the image just loaded is loaded. It is found that the image name and tag loaded are both none. Use docker tag eb40dcf64078 django:latest to modify them to the original image name and tag name, where eb40dcf64078 is the images id. 6. Use docker run -itd django:latest to load and verify whether the image can be successfully "run" Additional knowledge: Docker image import and export, image renaming. Can be used to deploy Docker applications offline Exporting an Image Docker images view image id and name Export using imageId (not recommended)
However, I found a problem that the image exported using imageId has both the repository and name as none when imported. However, when the image is exported using the image name and then imported again, none appears. The reason for this error is that when docker loads, the image with the same name will be overwritten and the original image will be renamed, resulting in the problem shown in the figure above. To rename an image: docker tag [image id] [new image name]:[new image tag] demo
Export using imageName (recommended)
demo
Importing an Image
demo The above article about docker packaging local images and restoring them to other machines is all I have to share with you. I hope it can give you a reference, and I also hope that you will support 123WORDPRESS.COM. You may also be interested in:
|
<<: How to call a piece of HTML code together on multiple HTML pages
>>: js to realize simple shopping cart function
Table of contents 1. Requirements description 2. ...
1. Requirements description Display the delete ic...
Feelings: I am a backend developer. Sometimes when...
Table of contents 1. Parent component passes valu...
This article introduces the method of manually bu...
The execution efficiency of MySQL database has a ...
Table of contents Pitfalls encountered in timesta...
<p><b>This is bold font</b></...
Table of contents Special characters in URLs URL ...
Preface Previously, static IPs assigned using pip...
This article shares the specific method of instal...
The question is referenced from: https://www.zhih...
It’s National Day, and everyone is eager to celeb...
This article uses examples to describe how to bac...
The default remote repository of Nexus is https:/...