0% found this document useful (0 votes)
2 views4 pages

Docker Command Cheat Sheet

The document outlines various Docker commands categorized into lifecycle, image, compose, networking, prune, basic, container, volume, hub, and logs/monitoring commands. Each command is accompanied by a brief explanation of its function, such as creating, starting, stopping containers, managing images, and handling networks. This serves as a comprehensive reference for users to understand and utilize Docker commands effectively.

Uploaded by

Patel Sarthak
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views4 pages

Docker Command Cheat Sheet

The document outlines various Docker commands categorized into lifecycle, image, compose, networking, prune, basic, container, volume, hub, and logs/monitoring commands. Each command is accompanied by a brief explanation of its function, such as creating, starting, stopping containers, managing images, and handling networks. This serves as a comprehensive reference for users to understand and utilize Docker commands effectively.

Uploaded by

Patel Sarthak
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Lifecycle Commands

1) Command: docker create

Explanation: Create a new container

1) Command: docker run

Explanation: Creates a container from docker image

1) Command: docker pause

Explanation: To pause a running container

1) Command: docker unpause

Explanation: To unpause a running container

1) Command: docker stop

Explanation: To stop a docker container

1) Command: docker start

Explanation: To start a docker container

Image Commands
1) Command: docker build

Explanation: To build Docker Image from Dockerfile

1) Command: docker pull

Explanation: To pull Docker Image from Docker Hub Registry

1) Command: docker tag

Explanation: To add Tag to Docker Image

1) Command: docker images

Explanation: To list Docker Images

1) Command: docker push

Explanation: To push Docker Images to Docker Hub

Compose Commands
1) Command: docker-compose build
Explanation: To build docker compose file

1) Command: docker-compose up

Explanation: To run docker compose file

1) Command: docker-compose ls

Explanation: To list docker compose

1) Command: docker-compose start

Explanation: To start containers which are already created using docker compose file

Networking Commands
1) Command: docker network create

Explanation: To create docker network

1) Command: docker network ls

Explanation: To list docker networks

Prune Commands
1) Command: docker system prune

Explanation: To clean all resources which are dangling or not associated with any docker

containers

1) Command: docker image prune

Explanation: To remove Dangling Docker images

1) Command: docker container prune

Explanation: To remove all unused docker containers

Basic Commands
1) Command: docker ps

Explanation: List all the running containers

1) Command: docker version

Explanation: To show Docker version


1) Command: docker info

Explanation: Displays system wide information

Container Commands
1) Command: docker logs

Explanation: To view Logs for a Docker Container

1) Command: docker rename

Explanation: To rename Docker Container

1) Command: docker kill

Explanation: To stop and remove Docker container

1) Command: docker cp

Explanation: To copy files or folders between a container and local filesystem

Volume Commands
1) Command: docker volume create

Explanation: To create docker volume

1) Command: docker volume inspect

Explanation: To inspect docker volume

Hub Commands
1) Command: docker search

Explanation: To search docker image

1) Command: docker pull

Explanation: To pull image from docker hub

1) Command: docker push

Explanation: Push an image or a repository to a registry

Logs and Monitoring Commands


1) Command: docker logs
Explanation: To show Docker container logs

1) Command: docker events

Explanation: To get all events of docker container

You might also like