Skip to main content

Command Palette

Search for a command to run...

Docker Cheat-Sheet

Published
•2 min read•View as Markdown
Docker Cheat-Sheet
A

I'm a DevOps enthusiast with a passion for learning and using the latest tools to streamline development and deployment workflows. From containerization to automation, I'm always on the lookout for ways to make the DevOps engineer's life easier. Follow me for insights into the latest trends and tools in DevOps, as well as tips and tricks for optimizing your workflows.

Working with Containers:

CommandDescription
docker run <image>Creates and starts a new container from the specified image
docker start <container>Starts a stopped container
docker stop <container>Stops a running container
docker rm <container>Deletes a stopped container
docker psLists all running containers
docker ps -aLists all containers (running and stopped)
docker logs <container>Displays the logs for a container
docker exec -it <container> <command>Executes a command inside a running container

Working with Images:

CommandDescription
docker pull <image>Downloads an image from a registry
docker build <directory>Builds an image from a Dockerfile
docker push <image>Uploads an image to a registry
docker imagesLists all locally available images
docker rmi <image>Deletes a locally available image

Working with Volumes:

CommandDescription
docker volume create <name>Creates a new volume
docker volume lsLists all available volumes
docker volume rm <name>Deletes a volume

Working with Networks:

CommandDescription
docker network create <name>Creates a new network
docker network lsLists all available networks
docker network rm <name>Deletes a network

System Administration:

CommandDescription
docker versionDisplays the Docker version
docker infoDisplays system-wide information about Docker
docker system pruneDeletes all stopped containers, unused networks, and dangling images
docker system dfShows the disk usage of Docker components

More from this blog

Amrendra's blog

30 posts