Latest Docker Command Cheat Sheet in PDF For Free

Docker command cheat sheet in PDF. This PDF file is containing commands from basic to intermediate level.  These command are written in very simple language. So everyone can understand them very easily Docker command cheat sheet. 

Docker Command cheat sheet

If you are new or don’t know anything about docker. Then you can read this article What is Docker. This article is designed only for beginner and intermediate level. After reading this article you will be having enough knowledge on docker. So that, you can talk with anyone about docker.

Docker Command Cheat Sheet PDF Content

If you are new to docker command or just have basic knowledge. Then don’t worry you are at right place. Because, this PDF is made only for beginner and intermediate level. Once you read this PDF, then you will not remain a common man. I am sure after reading this, you will be master of these commands.

In this paragraph, I will describe you about all the commands. Which this PDF file is containing. Then read it carefully. And all the content of file are latest and true. 

But this PDF file is containing the command in multiple steps. So that, it will be easy to understand for you.

  • Basic
  • Docker Image
  • Docker Container
  • Volume
  • Network
  • Dockerfile
  • Etc

I follow this format to create cheat sheet PDF file for you. Because this the best and easiest way to understand easily.

Download Docker Command Cheat Sheet

If you don’t like to search for specific command again and again. But you need it most of the time. Then it is the time to have all docker command permanently in your machine. Get it from below link direct download.

So once you download it, then it will store in your machine. And can use it anytime you want

Basic Docker Command

Basic Docker command cheat sheet

Check docker version

docker -v


docker --version

Detailed information about installed docker

docker info

How to look for help document

docker --help

Login to docker hub

docker login

logout from docker hub

docker logout

See all running containers

docker ps

See all running/stopped/exited container

docker ps -a

List all images

docker images

Check memory uses on system

docker stats

Check Disk uses of Docker

docker system df

Remove all un-used container and images

docker system prune

Docker Container Command Cheat Sheet

This is a isolated environment. Which is containing packages like- OS, Web Server, MySql, Etc and use for helps in running the software. It also contain the filing system snapshot with default commands. So commands might be use to enhance the container later.

Docker container command cheat sheet

Check all Running Container

docker ps

Check all Running and Stopped Container

docker ps -a

How to create container

docker run -it -d image-name

How to enter inside the container

docker exec -it container-id/name bash

Exit from container


Stop a container

docker stop container-id/name

Start a container

docker start container-id/name

Restart a container

docker restart container-id/name

Killing a Container

docker kill container-id/name

Delete a container

docker rm container-d/name

See all details of container

docker logs container-id/name

Add name to container

docker run -it -d --name <provide-any-container-name> <image-id>

Docker Images Command Cheat Sheet

Images are light weight executable package or template of software. Which are containing set of fixed instruction for creating the container.

When the image is downloaded. Then we’ll run this image with the assistance of command
(docker run name_of_image).

Therefore the run command will execute, then new container of that image will create.

So for creating new container, Run command shall always be implemented.

Docker image cheat sheet pdf

See all image

docker images

Download images from docker hub

docker pull image-name

Upload image to docker hub

docker push login-username/image-name

How to Run the image

docker run -it -d image-name

Delete an image

docker rmi image-name

Delete multiple image in single command

docker rmi image1 image2

Remove all un-used image

sudo docker prune

Docker Volume Command Cheat Sheet

The Docker volume are use to provide the persistent volume to docker container. When a container is not connected to any volume. After that if we stop the container then all data of container will be lost.

Volume command pdf

So to prevent our container data from loosing. We have to use docker volume. After using volume, container data be save permanently.  After using volume, if we stop or delete container. Then the container data will not lost.

Show all Volume

docker volume ls

Create a Volume

docker volume create volume-name

Get all details about volume

docker volume inspect volume-name

Delete a volume

docker volume rm volume-name

Remove all volume

docker volume prune

Attach volume to a container

sudo docker run -it -d -v volume-name:/give-location-where-you-want-to-store/  image-name

Docker Network Command Cheat Sheet

The Docker network is use to connect the multiple containers. If we have multiple container, and they are not connected to any network. Then they cant communicate with each other.

Network command pdf

So for providing ease of communication between containers. Then we have to use docker network. After connecting to the networks to container. Then container can exchange their data.

See all network

docker network ls

Create a new network

docker network create network-name

Get all details about volume

docker network inspect network-name

Attach a container with network

docker run -it -d --net network-name image-name

Attach a running container with network

docker network connect <network-name> <container-name>

Remove container from network

docker network disconnect <network-name> <container-name>

Delete a network

docker network rm network-name

Remove all un-used network

docker network prune

What is Dockerfile

Dockerfile is use to make your own custom image.

If we would like a picture which is containing an OS and an internet server. So for creating this image we’ve to use Dockerfile.

Dockerfile command pdf

Command to Run Dockerfile

How to run Dockerfile

docker  build  /location-of-dockerfile/  -t  any-name

Check all the image

docker images

Command to run that image

docker run -d -it image-name


In conclusion, you have completed in this article almost everything.

About Docker command cheat sheet like.

Basic Docker Command.

Container Command Cheat Sheet.

Image Command Cheat Sheet.

Volume Command Cheat Sheet.

Network Command Cheat Sheet.

And Last Dockerfile.

Finally, I hope this text was very helpful for you to know this Docker command cheat sheet. And now you’ve got reached to A level , where you’ll be able to bring up these docker commands to anyone.

So many thanks for reading this text . Because you are important to me.