DEV Community

Marcos Henrique
Marcos Henrique

Posted on

2 1

👾 Monster kill on all containers from docker

After few hours playing with docker basics, I'm front of the necessity to kill all of my container like another newbie on something used the scratch (go horse) way ONE by ONE 😱

docker rm c582332ca41c #container_id
docker stop c582332ca41c #container_id
Enter fullscreen mode Exit fullscreen mode

Best way to 🔪💀 containers

You'll need 3 pounds of plutonium for our yellow cake ☢️
...
hold on, I'm just kidding 🤣
...
Nothing much just our good old terminal

docker rm $(docker ps -aq)
# is the same for stopping command
docker stop $(docker ps -aq)
Enter fullscreen mode Exit fullscreen mode
  • -a: list all container
  • -q: quite mode

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

AWS GenAI LIVE!

GenAI LIVE! is a dynamic live-streamed show exploring how AWS and our partners are helping organizations unlock real value with generative AI.

Tune in to the full event

DEV is partnering to bring live events to the community. Join us or dismiss this billboard if you're not interested. ❤️