Last updated Jul 25, 2022

Docker Commands List: Ultimate Cheat Sheet for Developers

Master Docker faster with this ultimate commands cheat sheet. Learn key CLI commands to manage containers, images, and workflows.

Docker Commands List: Ultimate Cheat Sheet for Developers

Here we have prepared a list of commands that may be useful to you on Docker.

Useful commands for Docker

To check the currently installed version of docker

docker --version

List your images.

$ docker image ls

Delete a specific image.

$ docker image rm [image name]

Delete all existing images.

$ docker image rm $(docker images -a -q)

List all existing containers (running and not running).

$ docker container ls  (will list only running container)
$ docker container ls -a (will list all containers)

Start existing container.

docker container start [container-id/Name]

Stop a specific container.

$ docker stop [container-id/Name]

Stop all running containers.

$ docker stop $(docker ps -a -q)

Delete a specific container (only if stopped).

$ docker rm [container name]

Delete all containers (only if stopped).

$ docker rm $(docker ps -a -q)

Display logs of a container.

$ docker logs [container name]

Remove Unused container

docker container prune

Remove Unused images

$ docker image prune

Clean work system

docker system prune -a

Also read, Getting Started With Docker: A Beginners Guide

Tags

Available for projectsLet’s build together

Need this built properly,
not just explained?

I take on Angular and NestJS work directly — auth systems, multi-tenant SaaS, API rewrites and the deploy pipeline underneath them. You talk to the person writing the code.

Projects delivered
20+ Projects delivered
Angular • NestJS
7+ years Angular • NestJS
Average reply time
1 day Average reply time

What I can help with

  • Auth and permissions systems
  • Multi-tenant SaaS foundations
  • API design and rewrites
  • Deploy pipelines and VPS setup
  • Bug fixing and performance optimization
Send me a message

Tell me about your project and I’ll get back with a realistic scope and price.

Turn
Your Ideas
Into Reality

Stay in the loop

Get the finished tutorials, projects and resources in your inbox.

Join 5,000+ developers and get new tutorials, source code, product updates and exclusive content — straight to your inbox.

  • No spam
  • Useful content only
  • Unsubscribe anytime

Subscribe to TutsCoder

Be the first to get new tutorials, projects and tips.

Join 5,000+ developers already learning with us.

Learn
Build
Grow

Discussion

0 comments

Share your thoughts, ask questions or suggest improvements. Let’s learn and grow together!

No comments yet — be the first to start the discussion.

Join the discussion

Sign in to join the discussion. Your account also keeps your saved tutorials and path progress.