eugene
eugene

Reputation: 41665

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?

Upvotes: 0

Views: 84

Answers (1)

Avinash Reddy
Avinash Reddy

Reputation: 1185

A single image can be associated with multiple tags. i.e 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.

Upvotes: 2

Related Questions