SJ - Home

Docker Blitz

August 28, 2019

Do you have a rogue docker container unknowingly plaguing you?

I use this little bash snippet to help clear out vestiges of unwanted containers

    docker-blitz()
      {
          docker stop $(docker ps -a -q)
          docker rm $(docker ps -a -q)
          docker rmi $(docker images -f "dangling=true" -q)
          docker volume rm $(docker volume ls -qf dangling=true)
      }

Saima Jafri

Written by Saima Jafri who's based in Boston & tries to build useful things.
About Me
Follow me on Twitter!