Add a tag to an image with Docker

Add a tag to an image with Docker

Q. I added an image using PowerShell for containers but after restarting Docker engine the image is not present with a latest tag, what can I do?

A. By default when an image is added using PowerShell management infrastructure the OS image is also available in Docker (after restarting the Docker service) but will have a tag of the version only. If you also want the image to be tagged with "latest" to avoid having to specify the image version simply add a tag. For example view the images to view the image ID:

docker images

Then once you have the ID and image name add a latest tag using:

docker tag <image ID> <image name>:latest
e.g. docker tag dbfee88ee9fd windowsservercore:latest

Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish