Understanding <docker> commands made simple!
Understand the <action> <noun> pattern — and never Google basic Docker commands again.

It’s difficult when it comes to remembering all the docker commands.
Every time, Googling, and copying the commands — which takes quite a bit of time.
So, I’m going to share what I did to master the docker commands.
I understood the structure and how commands is being formed.
Docker Command Pattern
Almost every Docker command follows this structure:
docker <action> <noun>
Where:
Action = what you want to do (run, build, start, stop, etc.)
Noun = what you want to do it to (container, image, volume, network)
Common Examples
| Action (verb) | Noun (object) | Example command | Meaning |
run | image | docker run nginx | Run a container from the nginx image |
build | image | docker build -t myapp . | Build an image from a Dockerfile |
pull | image | docker pull ubuntu | Download an image from Docker Hub |
push | image | docker push myapp | Upload image to Docker registry |
ps | containers | docker ps -a | List all running/stopped containers |
start | container | docker start myapp | Start a stopped container |
stop | container | docker stop myapp | Stop a running container |
rm | container | docker rm myapp | Remove a container |
rmi | image | docker rmi myapp | Remove an image |
exec | container | docker exec -it myapp bash | Run a command inside a running container |
logs | container | docker logs myapp | Show container logs |
volume | (noun itself) | docker volume ls | Manage persistent storage |
network | (noun itself) | docker network ls | Manage container networking |
Tips
Understand the fundamentals
Get Your Hands Dirty!





