10 Docker Commands That Actually Matter in 2026
You're probably using Docker wrong. Not trying to be mean. But every week I see developers running docker ps -a and then piping through grep like it's 2015. Docker's CLI has evolved. Your muscle memory hasn't.
Here are the 10 commands that actually matter in 2026. No esoteric flags. No docker system prune spam. Just the tools you'll reach for daily.
1. docker ps --format — Stop reading raw tables
docker ps gives you a wall of text. docker ps --format "table {{.Names}} {{.Status}}" gives you exactly what you need. Learn the Go template syntax. It's not hard. Your future self will thank you.
2. docker logs --tail 100 -f — The only logs command you need
Don't scroll through 10,000 lines. --tail 100 shows the last 100 lines. -f follows new output. Combine them. You'll never use docker logs alone again.
3. docker exec -it <container> sh — But with a twist
Yes, sh not bash. Alpine-based images don't have bash. Save yourself the error message. And if the container has no shell? Use docker run --rm -it --entrypoint sh <image>.
4. docker container prune --force — Safe cleanup
docker system prune -a is nuclear. It removes everything. docker container prune only kills stopped containers. Add --force to skip the confirmation. Run it daily in CI.
5. docker image ls -f "dangling=true" -q — Find dead weight
Dangling images are layers with no tag. They eat disk space. This command lists their IDs. Pipe to xargs docker rmi to delete. Your SSD will breathe easier.
6. docker buildx build --push — Multi-arch made easy
In 2026, you're deploying to ARM and x86. buildx is built-in. Use --platform linux/amd64,linux/arm64 and --push to push to a registry. One command, two architectures. No more separate builds.
7. docker compose up -d --build — The dev workflow
docker-compose is now docker compose. --build rebuilds images before starting. -d detaches. This is your daily driver for local dev. Don't run docker-compose up without it.
8. docker stats --no-stream — Snapshot resource usage
docker stats streams data. --no-stream gives one snapshot. Perfect for checking memory leaks in a script. Combine with --format for JSON output.
9. docker inspect -f '{{.NetworkSettings.IPAddress}}' — Extract one field
docker inspect returns a JSON blob. Use -f with Go templates to pull exactly what you need. IP address, mount points, environment variables. No more scrolling.
10. docker system df — Disk usage at a glance
Before you prune, check what's taking space. docker system df shows images, containers, volumes, and build cache sizes. It's like df for Docker. Run it weekly.
Why these 10?
I've been using Docker since version 1.9. I've seen commands come and go. These 10 survived because they solve real problems. They're not flashy. They're not new. They're what you'll type every single day.
The cynical developer take
Sure, you could alias all of these into shell functions. You could write a Makefile. But then you'd be maintaining your own Docker CLI wrapper. Don't. Learn the real commands. They're already installed. They work everywhere. And when you SSH into a coworker's machine, you won't be lost.
One more thing
If you're still using docker rm $(docker ps -aq) to clean up, stop. That's a race condition waiting to happen. Use docker container prune instead. It's safer. It's faster. It's official.
Now go update your aliases. And yes, you should use docker compose not docker-compose. The hyphen is dead. Long live the space.