简体   繁体   中英

How to push latest docker image to docker hub?

I'm tagging my docker image as foo/foo:latest

When there's single image, it's fine to do docker push

But since I'm always tagging them as foo/foo:latest , I wonder if it's possible to upload not the latest built image.

When you tag an image, does the previous image loses the tag if it had the same tag?

A single image can be associated with multiple tags. ie If you try to remove an image using the docker image rm only metadata is removed if the image is associated with multiple tags.

But a tag can be associated with only a single image. Performing a docker push will overwrite the existing image in the repository.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM