Docker Shell Tricks

Overview One of my all time favorite tricks when working with Docker. Getting information on or performing an action on multiple containers with similar naming schemes. Passing the –filter name= flag allows for fuzzy matching. docker container ps -q returns only container ids by default and is perfect for combining with commands like docker container stop or docker container rm. Of course if you are using docker compose, simply running docker compose down will accomplish the same thing. ...

June 18, 2025 · 3 min · 571 words · Mike Conrad