# DockerCheatSheet: A Comprehensive Guide to Docker Commands

This repository profile is provided by osrepos.com, an open source repository discovery platform.

Source: osrepos.com
Repository profile: https://osrepos.com/repo/eon01-dockercheatsheet
Generated for open source discovery and AI-assisted research.

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
OSRepos URL: https://osrepos.com/repo/eon01-dockercheatsheet

## 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.

## Topics

- docker
- docker-compose
- docker-swarm
- containerization
- devops
- cheat-sheet
- development-tools
- commands

## Repository Information

Last analyzed by OSRepos: Fri Jul 17 2026 09:31:52 GMT+0100 (Western European Summer Time)
Detail views: 0
GitHub clicks: 2

## Safety Notice

OSRepos shares public repositories for knowledge and discovery only. Review source code, dependencies, licenses, and security implications before running or installing anything.

## Content

## Introduction

The `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.

## Getting Started with Docker

To begin interacting with Docker registries and images, here are some fundamental commands:

### Login to Docker Registry
bash
docker login
docker login localhost:8080


### Search for Docker Images
bash
docker search nginx
docker search --filter stars=3 --no-trunc nginx


### Pull Docker Images
bash
docker image pull nginx
docker image pull eon01/nginx localhost:5000/myadmin/nginx


### Build Docker Images
bash
docker build .
docker build -t eon/infinite .


## Key Docker Commands

The `DockerCheatSheet` covers a wide array of commands, making it easy to manage your Docker environment.

### Container Management

**Create and Run a Container**
bash
docker container run --name infinite -it -p 3000:80 -v ${PWD}:/data ubuntu:latest


**Start and Stop Containers**
bash
docker container start nginx
docker container stop nginx


**Remove a Container**
bash
docker container rm infinite


**List Active Containers**
bash
docker container ls
docker container ls -a


### Docker Networking

**Create a Network**
bash
docker network create -d overlay MyOverlayNetwork


**Connect a Container to a Network**
bash
docker network connect MyOverlayNetwork nginx


### Docker Swarm

**Initialize Docker Swarm**
bash
docker swarm init --advertise-addr 192.168.10.1


**Create a Service**
bash
docker service create --name vote -p 8080:80 instavote/vote


### Docker Compose

**Start Services in Background**
bash
docker compose up -d


**Stop and Remove Containers**
bash
docker compose down


### Docker Cleanup

**Remove All Exited Containers**
bash
docker container rm $(docker container ls -a -f status=exited -q)


**Prune Unused Docker Data**
bash
docker system prune -f


## Why Use This Cheat Sheet?

This 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.

## Useful Links

*   **GitHub Repository:** [eon01/DockerCheatSheet](https://github.com/eon01/DockerCheatSheet){:target="_blank"}
*   **Source Material:** [Painless Docker (2nd edition)](https://faun.dev/sensei/academy/painless-docker-2nd-edition-a19d29-c19c66-29f3a8-0/){:target="_blank"}