docker: Error: failed to remove one or more images

I am not able to remove this image docker run -p 8080:80 bgruening/galaxy-stable

$ sudo docker ps -a -q
69a86acd37be
87540cb4904e
5c3e20ad2159
1426b69a9709
2cba8dcddd66
52b492693f21

$ sudo docker rmi 52b492693f21
Error response from daemon: No such image: 52b492693f21
FATA[0000] Error: failed to remove one or more images 

How can I remove this image?

  • How to copy docker volume to local?
  • Trying to find reason for 500 error when running a Django site in Nginx
  • How to get into a docker container?
  • Docker Toolbox - Localhost not working
  • Spark Job Server not able to read text files in Docker Server
  • This site can't be reached docs/docker.github.io
  • Thank you in advance.

  • Setup GitLab CI for Rails with npm
  • Why does apt-get exit without an error during Dockerfile build?
  • Clone a secure git repo in Kubernetes pod
  • Kibana docker run
  • Run postgresql docker image with persistent data returns permission error
  • How can I automatically run a docker container on/after image build?
  • 3 Solutions collect form web for “docker: Error: failed to remove one or more images”

    You are listing the containers and trying to remove a container. Use docker images to list all the images and remove it with docker rmi IMAGEID with the proper id. If your intention is remove a container, not an image, use docker rm CONTAINERID

    run the wrong command to list docker images, it should be:

    docker images
    

    then you should be fine to remove the images with docker rmi

    But before to do that, make sure, the related containers all cleaned already.

    docker ps -a 
    docker rm -f XXXXXX  # -f means force removed if some of them are still in run mode.
    

    In your case, I think that you want to stop and remove a container after you run it docker run -p 8080:80 bgruening/galaxy-stable

    So you should run 2 commands below:

    sudo docker stop 52b492693f21
    sudo docker rm 52b492693f21
    

    If you need to remove a image, you should use commands docker images to list all images, and docker rmi to remove a image.
    Hope it helps

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.