• Contact
  • About Me
  • Privacy Policy
  • Disclaimer
DefenceDev
  • Home
  • Blog
  • Linux Tutorials
    • Bash Scripting Lessons
    • Commands
    • Networking
    • Bash Scripts
  • Solutions
    • Docker
  • Network Tutorials
    • FortiGate
    • MikroTik
  • Projects
    • AdGuard
    • Immich
    • Nextcloud
    • WordPress
  • Cloud
  • Video Tutorials
    • YouTube Channel
    • MikroTik Videos
  • Web Tools
No Result
View All Result
  • Home
  • Blog
  • Linux Tutorials
    • Bash Scripting Lessons
    • Commands
    • Networking
    • Bash Scripts
  • Solutions
    • Docker
  • Network Tutorials
    • FortiGate
    • MikroTik
  • Projects
    • AdGuard
    • Immich
    • Nextcloud
    • WordPress
  • Cloud
  • Video Tutorials
    • YouTube Channel
    • MikroTik Videos
  • Web Tools
No Result
View All Result
DefenceDev
No Result
View All Result
Home Solutions Docker

My Ultimate Docker Commands Cheat Sheet (2025 Edition)

by neo
November 28, 2025
in Docker
0
My Ultimate Docker Command Cheat Sheet (2025 Edition)

My Ultimate Docker Command Cheat Sheet (2025 Edition)

0
SHARES
102
VIEWS
Share on FacebookShare on LinkedIn
Table of Contents
  • Docker Command Cheat Sheet
    • Docker Basics Commands
    • Working with Images
    • Managing Containers
    • Volumes
    • Networking
    • Docker Compose
    • System Cleanup
    • Debugging & Monitoring
    • Working with Docker Hub & Registries
    • Bonus: Useful Aliases
  • Conclusion

Docker Command Cheat Sheet

Looking for the ultimate Docker commands cheat sheet? This guide brings you a reference of essential Docker CLI commands, organized by category for quick access and daily use.

Docker is an essential tool for developers, sysadmins, and DevOps professionals. Whether you’re a beginner or a daily user, this cheat sheet provides all the must-know Docker commands organized for quick reference.

Docker Basics Commands

These basic commands help you check the installed version, system status, and overall Docker information.

CommandDescription
docker --versionDisplays the installed Docker version.
docker infoShows detailed system-wide information.
docker helpLists all available Docker commands.
docker system dfShows disk usage by Docker components.

Working with Images

Docker images are the foundation of every container. These commands help you manage images efficiently.

CommandDescription
docker imagesLists all local Docker images.
docker pull nginxDownloads an image from Docker Hub.
docker build -t my-image .Builds a Docker image from a Dockerfile.
docker rmi image-idRemoves a local image.
docker tag my-image username/repo:tagTags an image for a repository.

Managing Containers

Containers are running instances of images. Use these commands to start, stop, and interact with containers.

CommandDescription
docker psLists running containers.
docker ps -aShows all containers, including stopped ones.
docker run -it ubuntu bashStarts a new interactive Ubuntu container.
docker start/stop/restart containerControls the container’s lifecycle.
docker exec -it container bashAccesses a running container shell.

Volumes

Volumes are used for persistent data in Docker. The following commands let you manage volumes.

CommandDescription
docker volume lsLists all Docker volumes.
docker volume create my-volumeCreates a new named volume.
docker run -v my-volume:/data ...Mounts a volume inside a container.
docker volume inspect my-volumeDisplays details about a volume.
docker volume rm my-volumeDeletes a volume.

Networking

Docker networks allow containers to communicate. These commands help you inspect and create networks.

CommandDescription
docker network lsLists all Docker networks.
docker network create my-netCreates a new custom network.
docker network connect my-net containerConnects a container to a network.
docker network inspect my-netShows detailed information about the network.

Docker Compose

Docker Compose lets you define and manage multi-container applications with a single file.

CommandDescription
docker-compose up -dStarts containers in detached mode.
docker-compose downStops and removes containers, networks, and volumes.
docker-compose buildBuilds images defined in docker-compose.yml.
docker-compose logs -fStreams logs from services.
docker-compose psLists running Compose containers.

System Cleanup

Over time, Docker can consume a lot of disk space. These commands help you clean unused data.

CommandDescription
docker system pruneRemoves unused containers, networks, and images.
docker image pruneRemoves dangling images.
docker container pruneDeletes stopped containers.
docker volume pruneRemoves unused volumes.

Debugging & Monitoring

These commands help you troubleshoot, monitor, and inspect running containers and Docker resources.

CommandDescription
docker logs containerShows logs from a container.
docker inspect containerDisplays low-level container details in JSON.
docker top containerShows running processes in a container.
docker statsLive resource usage statistics for containers.

Working with Docker Hub & Registries

You can push and pull images to and from registries. These commands are essential for sharing containers.

CommandDescription
docker loginAuthenticates to a Docker registry.
docker push username/imagePushes a local image to a registry.
docker pull username/imageDownloads an image from a registry.

Bonus: Useful Aliases

Speed up your workflow with helpful aliases.

CommandDescription
alias dps='docker ps'Shortcut for listing containers.
alias drm='docker rm $(docker ps -aq)'Quickly remove all containers.
alias dclean='docker system prune -af --volumes'Full cleanup of Docker.

Conclusion

This cheat sheet gives you instant access to the most powerful Docker commands in one place. Bookmark it, share it, and use it to boost your productivity in containerized environments. If you think something is missing or want to suggest a command, feel free to leave a comment below!

If you’re working with Docker on Raspberry Pi, don’t miss these practical guides that show real-world use cases:

  • Install Docker on Raspberry Pi 4
  • Docker DDoS Protection with Raspberry Pi
  • Install WordPress in Docker on Raspberry Pi 4
  • Run Nextcloud in Docker on Raspberry Pi
  • NGINX Proxy Manager in Docker (Raspberry Pi 4)

These articles provide step-by-step guidance to deploy powerful apps using Docker on low-power devices.

Tags: docker
Previous Post

My Ultimate FortiGate Command Cheat Sheet

Next Post

My Ultimate Linux/Ubuntu Commands Cheat Sheet (2025)

neo

Related Posts

Install Portainer on Ubuntu 24.04 Using Docker Compose
Docker

Install Portainer on Ubuntu 24.04 Using Docker Compose

Protect Docker-Hosted Application from HTTP Flood (DDoS) Attacks Using a Bash Script
Docker

Protect Docker-Hosted Application from HTTP Flood (DDoS) Attacks Using a Bash Script

Install WordPress on Raspberry Pi 4 with Docker (Ubuntu 22.04)
Docker

Install WordPress on Raspberry Pi 4 with Docker (Ubuntu 22.04)

Install Nextcloud on Raspberry Pi 4 with Docker (Ubuntu 22.04)
Docker

Install Nextcloud on Raspberry Pi 4 with Docker (Ubuntu 22.04)

Install Nginx Proxy Manager on Raspberry Pi 4 with Docker (Ubuntu 22.04)
Docker

Install Nginx Proxy Manager on Raspberry Pi 4 with Docker (Ubuntu 22.04)

Install Docker on Raspberry Pi 4 with Ubuntu 22.04
Docker

Install Docker on Raspberry Pi 4 with Ubuntu 22.04

Next Post
My Ultimate Linux/Ubuntu Commands Cheat Sheet (2025)

My Ultimate Linux/Ubuntu Commands Cheat Sheet (2025)

Recommended

MikroTik: Reset to Factory Settings with Terminal CLI

MikroTik: Reset to Factory Settings with Terminal CLI

FortiGate DDoS Protection: Configure DoS Policies to Secure Self-Hosted Applications

FortiGate DDoS Protection: Configure DoS Policies to Secure Self-Hosted Applications

Maximizing Network Efficiency with AdGuard: My 7-Day Results

Maximizing Network Efficiency with AdGuard: My 7-Day Results

FortiGate Brute Force Protection: Ban IPs After Failed Admin Login

FortiGate Brute Force Protection: Ban IPs After Failed Admin Login

Install Portainer on Ubuntu 24.04 Using Docker Compose

Install Portainer on Ubuntu 24.04 Using Docker Compose

Categories

  • Blog
  • Cloud
    • Private
  • Linux Tutorials
    • Bash Scripting Tutorials
    • Commands
    • Networking
  • Network Tutorials
    • FortiGate
    • MikroTik
  • Projects
    • AdGuard
    • Immich
    • Nextcloud
    • WordPress
  • Solutions
    • Docker
  • Video Tutorials
    • MikroTik Videos
  • Web Tools

DefenceDev Tutorials

defencedev Logo

Whether you’re just starting or looking to expand your skills, I hope you find useful information and engaging discussions here. Let me take you through my journey and the goals behind this space!

Follow Us

Recent News

Maximizing Network Efficiency with AdGuard: My 7-Day Results

Maximizing Network Efficiency with AdGuard: My 7-Day Results

FortiGate Brute Force Protection: Ban IPs After Failed Admin Login

FortiGate Brute Force Protection: Ban IPs After Failed Admin Login

  • Site Map
  • Privacy Policy
  • Facebook Page
  • Disclaimer
  • Contact
  • About Me

© 2025 defencedev.com - All rights reserved.

No Result
View All Result
  • Home
  • Blog
  • Linux Tutorials
    • Bash Scripting Lessons
    • Commands
    • Networking
    • Bash Scripts
  • Solutions
    • Docker
  • Network Tutorials
    • FortiGate
    • MikroTik
  • Projects
    • AdGuard
    • Immich
    • Nextcloud
    • WordPress
  • Cloud
  • Video Tutorials
    • YouTube Channel
    • MikroTik Videos
  • Web Tools

© 2025 defencedev.com - All rights reserved.