Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to duplicate docker image with a new tag?

Tags:

docker

Let's say I have an image with tag :latest.
I'd like to duplicate the image on my PC and then give it another tag like :1.4.2

I do not want to build the image, just copy and retag it.

like image 573
Maciaz Avatar asked Dec 18 '25 22:12

Maciaz


1 Answers

I occasionally need to clone docker images that clients are using as a backup when they want to try a new version. This provides them the option of easily reverting if needed.

assuming your image is called best-ui and has the tag latest we will clone this with the tag old

docker tag best-ui:latest best-ui:old

now run docker images and you will see the new cloned image with the new tag

like image 149
JGilmartin Avatar answered Dec 20 '25 17:12

JGilmartin



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!