Create named and latest tag in Docker

0 votes
Let's assume I am having an image that I want to tag as 0.10.24. I built that image using a Dockerfile and executing docker build and by providing a tag using the -t parameter.

I expect that one day I will have additional versions of that image, so I will rerun the process, just with another tag name.

But I also want to always have the newest image tagged ad latest additionally, I think I need to give two names to the very same image.

Can anyone resolve my query?
Oct 11, 2018 in Docker by Damon Salvatore
• 5,980 points
783 views

1 answer to this question.

0 votes

Here is what you can do to resolve your problem.

You can have multiple tags when building the image:

$ docker build -t whenry/fedora-jboss:latest -t whenry/fedora-jboss:v2.1 .
Below is the reference you can see to clear your doubts.

Reference: https://docs.docker.com/engine/reference/commandline/build/#tag-image-t

answered Oct 11, 2018 by Damon Salvatore
• 5,980 points

Related Questions In Docker

0 votes
0 answers

How to create named and latest tag in Docker?

Assume I have an image that I ...READ MORE

Apr 21, 2022 in Docker by pranav
• 2,590 points
696 views
0 votes
1 answer

How to create a container and run images in docker?

Look for what all images you have ...READ MORE

answered Feb 23, 2019 in Docker by Kalgi
• 52,350 points
2,255 views
0 votes
1 answer

Different file owner inside Docker container and in host machine

Here is what you can try. Since ...READ MORE

answered Jun 27, 2018 in Docker by Atul
• 10,240 points
1,955 views
0 votes
1 answer

What is the difference between “expose” and “publish” in Docker?

Basically, you have three options: Neither specify EXPOSE nor -p -> ...READ MORE

answered Jul 18, 2018 in Docker by Nilesh
• 7,060 points
3,306 views
+2 votes
1 answer
+2 votes
1 answer

Deploy Docker Containers from Docker Cloud

To solve this problem, I followed advice ...READ MORE

answered Sep 3, 2018 in AWS by Priyaj
• 58,020 points
2,739 views
0 votes
1 answer

Different file owner inside Docker container and in host machine Ask

Filesystems, at least in Unix- and Linux-like ...READ MORE

answered Jun 25, 2018 in Docker by Damon Salvatore
• 5,980 points
964 views
0 votes
1 answer

How do I install phantomjs with node in docker

Here is what you can try. Link for existing ...READ MORE

answered Aug 1, 2018 in Docker by Damon Salvatore
• 5,980 points
5,864 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP