skip to Main Content

I am simply trying to delete this docker image that is currently running in a container. When I click stop, it immediately starts another container. I cannot delete the image because it constantly says its in use.

Here is Docker Desktop after I just stopped the 2 containers, and you can see another one has spawned without any action from me.enter image description here

Please let me know if any other information is required

2

Answers


  1. Try using the following command in the terminal:

    docker system prune -a
    

    It will clean up unused Docker objects, including images, containers, networks, and volumes.

    Keep in mind that the image can be deleted only after all related to it containers are removed.

    To remove a docker container use

    docker rm <container_id>
    
    Login or Signup to reply.
  2. Those look like the Kubernetes containers that are part of Docker Desktop, and if that’s the case you could just turn that feature off.

    This is in "Settings" under "Kubernetes": Turn off "Enable Kubernetes"

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search