Rishab Batra

CheatSheet For me

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

--

--