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
1. Write Shell script crontab.sh #!/bin/bash step...
Table of contents 1. Retrieve via --skip-grant-ta...
Ubuntu 15.04 opens MySQL remote port 3306. All th...
1. Command Introduction bzip2 is used to compress...
Integrity constraints Integrity constraints are f...
We implement a red image style for the clicked bu...
<br />This is not only an era of information...
Preface It is said that if the people doing opera...
Table of contents Portals Error Boundary Handling...
deepin and Ubuntu are both distributions based on...
Table of contents 1. Understanding Queues 2. Enca...
Today we will introduce how to publish the local ...
Table of contents Preface Input box component lay...
Causes and consequences 1. When using the ansible...
The HTML structure is as follows: The CCS structu...