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,510 points
34 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,510 points

Related Questions In Docker

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 22 in Docker by Kalgi
• 41,990 points
111 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
246 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
• 6,880 points
427 views
0 votes
1 answer
0 votes
1 answer
0 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
• 56,900 points
218 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,510 points
80 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,510 points
725 views