You can tag a docker image using docker tag, actually, it creates an image with a name that you specify in docker tag command.
Create a tag TARGET_IMAGE that refers to SOURCE_IMAGE
Tag an image referenced by ID
To tag a local image with ID “0e5574283393” into the “fedora”
repository with “version1.0”:
$ docker tag 0e5574283393 fedora/httpd:version1.0
Suppose you have an image named Beta1-test, you can tag like
docker tag Beta1-test Beta1-test_old
This will tag the Beta1-test image with new Beta1-test to Beta1-test_old.
Docker tag is just a way of referring to your image.
So you can remove the Beta1-test using
docker rmi -f Beta1-test
now, as you have that image with new tag Beta1-test_old
Now you are able to build image like
docker build -t Beta1-test
Beta1-test this is your new image after the build, and we tag the previous one with Beta1-test_old.
You have both new having name Beta1-test and old having name Beta1-test_old
You can view you docker images using this command.
docker images
or
docker images Beta1-test
docker tagcommand.