11

I have a docker image with <none> tag.enter image description here

I want to run the hello-world image with TAG <none>. How can I do that?

Philipp Ludwig
  • 3,758
  • 3
  • 30
  • 48
Ghil Maan
  • 581
  • 2
  • 4
  • 11

4 Answers4

19

In order to run a dangling image, you first need to tag that image. You can do this by using image ID.

For example:

docker tag [IMAGE_ID] [REPOSITORY]:[TAG]

Now you can run that image with the tag you just defined.

Pang
  • 9,564
  • 146
  • 81
  • 122
Ghil Maan
  • 581
  • 2
  • 4
  • 11
6

You can run a container from a specific image by using the image's ID, like:

docker run -it efb6339f1b3e /bin/bash

If you want to give your image a tag, you can do that by using -t option in the docker build command, like:

docker build -t codinghaus/hello-world:1.0.0
Pang
  • 9,564
  • 146
  • 81
  • 122
codinghaus
  • 2,218
  • 1
  • 14
  • 19
0
docker tag <image-name> <image-name>[:tag]

Example:

docker tag hello_world hello_world[:2]
Pang
  • 9,564
  • 146
  • 81
  • 122
dvs
  • 511
  • 1
  • 10
  • 27
0

I ran it like this successfully and the tag of the image is 'none' enter image description here

Command on Macos: docker run -it --entrypoint=/bin/bash --env-file ~/docker/env.list -u root a480ebfb5d6d9ef62eef279512f6cadb57717efaa8b05afe301c52ed27ff9ef0