16 Docker Commands to Remember

CheatSheet For me

Rishab Batra
Jun 28, 2022

1] Docker Version

docker — version

2]Docker Status


service docker status

3]Start Docker


service docker start

4]Stop Docker


service docker stop

5]Pull redis image


docker pull redis

6]Run Container


docker run -it -d redis

7]Docker list out all the containers


docker ps

8]Docker list out all the containers stopped and Running


docker ps -a

9]Docker Navigate inside container


docker exec -it container_id bash

10]Stop Container


docker stop contaier_id

11]Kill Container


docker kill container_id

12]Commit Image


docker commit container_id username/image_name

13]Push Image


docker push username/imagename

14]View Image


docker images

15]Docker Remove Container


docker rm container_id

16]Docker Build


docker build -t ImageName .

where . represents if the docker file is present in the current directory

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

Rishab Batra
Rishab Batra

No responses yet

Write a response