An image tag gives a Docker image a readable reference instead of requiring its image ID. A reference can include a version and a registry location, making it useful for building, publishing, and running an image. section 3.8.2 section 3.9.2
Build and check a tagged image
Run `docker build -t video-streaming --file Dockerfile .` from the project directory. The final `.` selects the current directory. Because no version is specified, the tag defaults to `latest`. Run `docker image list` to check the repository, tag, and image ID. section 3.8.2
To publish the image, authenticate to your registry with `docker login`, then give the existing image a registry-qualified tag. The general form is `docker tag <existing-image> <registry-url>/<image-name>:<version>`. Replace the placeholders with your own registry and image details. section 3.9.2
Tag and push a version
For example, `docker tag video-streaming bmdk1.azurecr.io/video-streaming:1` adds a registry-qualified reference. Then `docker push bmdk1.azurecr.io/video-streaming:1` uploads that version. Use your own registry URL for both commands. section 3.9.2
Adding a tag does not create another image. Check `docker image list`: the original and new references have the same image ID. Multiple tags can also affect removal; removing the image by ID may require `--force` when it is referenced multiple times. section 3.9.2 section 3.9.3
A registry-qualified reference can also be used with `docker run`. To test a published version, use the registry URL, image name, and version that you pushed. Versioned tags can distinguish successive image builds in a continuous deployment pipeline. section 3.9.3 section 3.8.2





