Search code examples
dockeramazon-ecsamazon-ecr

Unable to remove tag of a docker image due to 'no such image' error


Here is a output from my docker images command

REPOSITORY                                                      TAG                    IMAGE ID            CREATED             SIZE
888668560264.dkr.ecr.ap-southeast-2.amazonaws.com/simplequeue   0.1                    df74fbea0533        11 minutes ago      601 MB
888668560264.dkr.ecr.ap-southeast-2.amazonaws.com/simplequeue   0.2                    df74fbea0533        11 minutes ago      601 MB
888668560264.dkr.ecr.ap-southeast-2.amazonaws.com/simplequeue   latest                 df74fbea0533        11 minutes ago      601 MB

These images have been pushed to aws ecr.

I have mistagged the image as 0.1 and I want to remove this label. However, when I tried docker rmi

> docker rmi simplequeue:0.1
Error response from daemon: No such image: simplequeue:0.1

If I just use docker rmi simplequeue, I got this

> docker rmi simplequeue
Untagged: simplequeue:latest

and the docker images output stay the same. It does not look to me the tags have been removed (latest and 0.1 are still avaialble).

How can I remove the tag 0.1?


Solution

  • Try this, you have to specify repository + tag.

    docker rmi 888668560264.dkr.ecr.ap-southeast-2.amazonaws.com/simplequeue:0.1