You can retag a Docker image referenced by name and tag as follows:
docker tag old-tag new-tag
Example:
docker tag webserver:old kindacode/webserver:new
You can also tag/retag an image with its ID:
docker tag <image-ID> <my-image-name:tag>
Further reading
- Start, Pause, Restart, Stop, and Delete a Docker Container
- How to reset Docker Desktop
- How to Delete Docker Images on your System
- How to Get the Size of a Docker Image
- Docker: How to List Running and Stopped Containers
You can also check out our Docker topic page for the latest tutorials, examples, tips, and tricks.