DEV Community

shubham
shubham

Posted on

Docker Cheat Sheet 🐳

1.List all Docker Images

docker images -a
Enter fullscreen mode Exit fullscreen mode

2.List all running Docker containers

docker ps
Enter fullscreen mode Exit fullscreen mode

3.List all Doker containers.

docker ps -a
Enter fullscreen mode Exit fullscreen mode

4.Start a Docker container.

docker start <container name>
Enter fullscreen mode Exit fullscreen mode

5.Stop a Docker container.

docker stop <container name>
Enter fullscreen mode Exit fullscreen mode

6.Kill all running containers.

docker kill $(docker ps -q)
Enter fullscreen mode Exit fullscreen mode

7.View the logs of all Docker Containers.

docker logs <container name>
Enter fullscreen mode Exit fullscreen mode

8.Remove all docker images.

docker rmi <image name>
Enter fullscreen mode Exit fullscreen mode

Discussion (0)