Difference between revisions of "Docker copy an image to another server"

From MyWiki
Jump to: navigation, search
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
 
'''Save the image as a tar file:'''<br>
 
'''Save the image as a tar file:'''<br>
          docker save -o <path for generated tar file> <image name><br>
+
docker save -o <path for generated tar file> <image name><br>
 
'''Copy the tar file to target server'''<br>
 
'''Copy the tar file to target server'''<br>
 
'''Then load it on the target server'''<br>
 
'''Then load it on the target server'''<br>
docker load -i <path to image tar file><br>
+
docker load -i <path to image tar file><br>

Latest revision as of 13:50, 25 August 2023

Save the image as a tar file:

docker save -o <path for generated tar file> <image name>

Copy the tar file to target server
Then load it on the target server

docker load -i <path to image tar file>