Docker Commands


Basic Commands

1)docker version

2)docker -v
3)docker info
4)docker --help

docker --help

Example: Get information about images.....
docker images --help     --> Gives you details about how to use images command
docker run --help --> Gives you details about how to use run commands
5)docker login

Images Commands

6)docker images    --> lists the images present in the machine

7)docker pull   ---> pull the image from docker hub
docker pull ubuntu
docker images  --> list the image

8)docker rmi
docker images -q   --> Gives you image ID
docker rmi <>   ----> Deletes image
docker images   ---> No Images


Containers Commands


9)docker ps  & : docker run


docker ps ---> List the containers, Bo containers as of now.

docker run ubuntu ---> Locally not available ,Pulling image from Dockerhub.
docker ps --> Still not listed contaner, becoz we didi not created container so far....
docker run -it ubuntu   ---> inside ubuntu
docker ps ---> lists the container


10) docker start
docker start <>

11)docker stop
docker stop <>

System Commands


12) docker stats   --> gives details abount running containers, memory usage etc..

13)docker system df
14)docker system prune 
docker system prune -f --> Rermoves all stopped contaniers



Followers