Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Docker load command replaces existing images with same name

I have a simple question about the docker load command.

If an image exists in the local repository and running the docker load command loads an image with the same name as the one that is in the repository, does the old image get replaced with the one that is loaded?

like image 994
Kingamere Avatar asked Sep 26 '22 02:09

Kingamere


1 Answers

As shown in docker load page, it "restores both images and tags."

So an image from the same name doesn't get overwritten.
A docker images would simply lists the newly loaded image alongside the existing one, with their respective ids and tags.

As explained in "Content trust in Docker", a registry can include multiple images of the same names (but with different ids or tags)

https://docs.docker.com/engine/security/trust/images/tag_signing.png

like image 185
VonC Avatar answered Sep 30 '22 08:09

VonC