Docker Commands Cheatsheet.

Docker Commands Cheatsheet.

This blog contains important docker commands with their description.

  • docker --version : It will show the current version of the docker.

  • docker pull : It will pull an image from the registry to the local machine

  • docker images : It will display all images

  • docker rmi : It will remove an image

  • docker history : To display the history of an image

  • docker build : You can create an image from Dockerfile.

  • docker tag : It will tag the image to a name

  • docker rename : To rename the container.

  • docker run : It will create and start the container in one task

  • docker rm : It will delete a container

  • docker run --rm : It will remove the container once it stops

  • docker start : It will start a container, so it is running

  • docker stop : It will stop a running container.

  • docker restart : It stops and starts a container.

  • docker kill : It kills a running container.

  • docker exec : To execute a command in a container.

  • docker ps : It will display the running containers.

  • docker ps -a : It will display the running and stopped containers.

  • docker logs : Provide the logs from the container.

  • docker inspect : It checks all the information on a container (including IP address).

  • docker top : It will display the running processes in the container.

  • docker info : It will display system-wide information about docker.

  • docker help : It will display detailed information about every other docker command.

Happy Learning :))