 List of Common Docker commands

This command is used to run a command in a new container.

 $ docker container run

This command is used to start one or more stopped containers.

 $ docker container start

This command is used to stop one or more running containers.

 $ docker container stop

This command is used to restart one or more containers.

 $ docker container restart

This command is used to remove one or more docker containers.

 $ docker container rm

This command is used to run a command in a run-time container

 $ docker container exec

This command is used attach to a running container

 $ docker container attach

This command is used to fetch all the running containers.

 $ docker container ls

This command forcefully terminates the container execution.

 $ docker container kill

This command is used to copy files/folders between a container and the local machine.

 $ docker container cp 

This command is used to rename a container.

 $ docker container rename

This command is used to fetch the logs of a container.

 $ docker container logs

This command is used to build an image form a Docker file.

 $ docker build

This command is used push an image or a repository to a registry.

 $ docker image push

This command is used pull an image or a repository from a registry.

 $ docker image pull

This command is used to search the Docker Hub for images

 $ docker search

This command is used export a container’s file system as a tar archive

 $ docker container export

This command is used create a new image from a container’s changes

 $ docker container commit

This command is used to show the history of an image.

 $ docker image history

This command is used to remove one or more images.

 $ docker image rm

This command is used to log in to a Docker registry.

 $ docker login

This command is used to log out from a Docker registry.

 $ docker logout

This command is used to extract docker version information.

 $ docker version

This command is used to fetch the real time events from the server.

 $ docker  events

docker events
This command is used to manage the Plugins.

 $ docker plugin

This command is used to manage Docker configuration.

 $ docker config