{"name":"DockerCheatSheet: A Comprehensive Guide to Docker Commands","description":"The DockerCheatSheet repository offers a comprehensive and highly-starred collection of Docker commands, serving as an invaluable resource for developers and DevOps engineers. Based on the 'Painless Docker' guide, it covers everything from basic container operations to advanced Docker Swarm and Compose functionalities. With nearly 4,000 stars, this cheat sheet is a popular and actively maintained reference for mastering Docker.","github":"https://github.com/eon01/DockerCheatSheet","url":"https://osrepos.com/repo/eon01-dockercheatsheet","source":"osrepos.com","sourceDescription":"This repository profile is provided by osrepos.com, an open source repository discovery platform.","repositoryProfile":"https://osrepos.com/repo/eon01-dockercheatsheet","generatedFor":"open source discovery and AI-assisted research","markdown":"https://osrepos.com/repo/eon01-dockercheatsheet.md","json":"https://osrepos.com/repo/eon01-dockercheatsheet.json","topics":["docker","docker-compose","docker-swarm","containerization","devops","cheat-sheet","development-tools","commands"],"keywords":["docker","docker-compose","docker-swarm","containerization","devops","cheat-sheet","development-tools","commands"],"stars":null,"summary":"The DockerCheatSheet repository offers a comprehensive and highly-starred collection of Docker commands, serving as an invaluable resource for developers and DevOps engineers. Based on the 'Painless Docker' guide, it covers everything from basic container operations to advanced Docker Swarm and Compose functionalities. With nearly 4,000 stars, this cheat sheet is a popular and actively maintained reference for mastering Docker.","content":"## Introduction\n\nThe `DockerCheatSheet` repository by eon01 is an incredibly popular and well-maintained resource for anyone working with Docker. With thousands of stars and forks, it serves as a quick and comprehensive reference guide for various Docker commands and concepts. This cheat sheet is an adaptation of content from the 'Painless Docker' (2nd edition) guide, making it a reliable source for practical Docker knowledge.\n\n## Getting Started with Docker\n\nTo begin interacting with Docker registries and images, here are some fundamental commands:\n\n### Login to Docker Registry\nbash\ndocker login\ndocker login localhost:8080\n\n\n### Search for Docker Images\nbash\ndocker search nginx\ndocker search --filter stars=3 --no-trunc nginx\n\n\n### Pull Docker Images\nbash\ndocker image pull nginx\ndocker image pull eon01/nginx localhost:5000/myadmin/nginx\n\n\n### Build Docker Images\nbash\ndocker build .\ndocker build -t eon/infinite .\n\n\n## Key Docker Commands\n\nThe `DockerCheatSheet` covers a wide array of commands, making it easy to manage your Docker environment.\n\n### Container Management\n\n**Create and Run a Container**\nbash\ndocker container run --name infinite -it -p 3000:80 -v ${PWD}:/data ubuntu:latest\n\n\n**Start and Stop Containers**\nbash\ndocker container start nginx\ndocker container stop nginx\n\n\n**Remove a Container**\nbash\ndocker container rm infinite\n\n\n**List Active Containers**\nbash\ndocker container ls\ndocker container ls -a\n\n\n### Docker Networking\n\n**Create a Network**\nbash\ndocker network create -d overlay MyOverlayNetwork\n\n\n**Connect a Container to a Network**\nbash\ndocker network connect MyOverlayNetwork nginx\n\n\n### Docker Swarm\n\n**Initialize Docker Swarm**\nbash\ndocker swarm init --advertise-addr 192.168.10.1\n\n\n**Create a Service**\nbash\ndocker service create --name vote -p 8080:80 instavote/vote\n\n\n### Docker Compose\n\n**Start Services in Background**\nbash\ndocker compose up -d\n\n\n**Stop and Remove Containers**\nbash\ndocker compose down\n\n\n### Docker Cleanup\n\n**Remove All Exited Containers**\nbash\ndocker container rm $(docker container ls -a -f status=exited -q)\n\n\n**Prune Unused Docker Data**\nbash\ndocker system prune -f\n\n\n## Why Use This Cheat Sheet?\n\nThis Docker cheat sheet is an essential tool for anyone working with containerization. It provides a quick, organized, and comprehensive reference for frequently used Docker commands, saving valuable time during development and operations. Whether you are a beginner learning Docker or an experienced professional needing a quick reminder, this repository helps streamline your workflow and reinforce your understanding of Docker's vast capabilities. Its clear structure and practical examples make it an excellent companion for daily Docker tasks.\n\n## Useful Links\n\n*   **GitHub Repository:** [eon01/DockerCheatSheet](https://github.com/eon01/DockerCheatSheet){:target=\"_blank\"}\n*   **Source Material:** [Painless Docker (2nd edition)](https://faun.dev/sensei/academy/painless-docker-2nd-edition-a19d29-c19c66-29f3a8-0/){:target=\"_blank\"}","metrics":{"detailViews":0,"githubClicks":2},"dates":{"published":null,"modified":"2026-07-17T08:31:52.000Z"}}