In docker you export an image into a tar file and then import that image without ever needing to download it again from docker hub.
To export an image you need to know the image name in your host (you can get image name by listing all images using
—------------------------—
—------------------------—
If you want to import this images in another server or in case all your images have been removed from your host server or local server, you just need to use
—------------------------—
—------------------------—
You need to be in the path that
Now after loading the image you can see that the image is added to your local registry. To check that use
#docker #import #export #save #load #registry #hub #image
To export an image you need to know the image name in your host (you can get image name by listing all images using
docker images
):—------------------------—
docker save python > python.tar
—------------------------—
python
is an image name in docker hub that we have downloaded it once from the hub registry. Now after using save
command you will have a .tar
file in your current path.If you want to import this images in another server or in case all your images have been removed from your host server or local server, you just need to use
load
command to load the image into your local docker registry:—------------------------—
docker load -i python.tar
—------------------------—
You need to be in the path that
python.tar
file exists.Now after loading the image you can see that the image is added to your local registry. To check that use
docker images
#docker #import #export #save #load #registry #hub #image