I'm using Docker 1.12.6.
I have pulled an image from the Docker registry.
I have exported the images as tar files using the docker save
command.
I removed the original image and container and loaded the exported image using docker load -i myImage.tar
.
Now, when running docker images
I notice my image have lost its repository/tag information:
REPOSITORY TAG IMAGE ID CREATED SIZE
<none> <none> 5fae4d4b9e02 8 weeks ago 581.3 MB
Why does it have this behavior and how do I keep the original image name?
I had the same problem, so then I used with the following command to fix it manually:
docker tag <Image-ID> <desired Name:Tag>
Reference
[NOTE]:
AND:
Use
The command
docker save <image id>
removes the repository and tag names.To solve this, use
docker save <repo>:<tag>
it will keep the repository and tag name in the saved file. For example:A single image ID can have multiple names/tags, so the way that you loose the the names and tags is what I would expect to happen after saving and loading the image to/from a tar ball.
Mode details are in the discussion about it here
From docker documentation:
cat exampleimage.tgz | docker import - exampleimagelocal:new
This one worked for me.