🚀 Introduction

Docker has transformed the way we develop, ship, and deploy applications by providing consistent environments across development, testing, and production. Whether you're just starting out or need a refresher, this Docker CLI cheatsheet covers the most essential commands every developer should know.


🔧 Getting Started

📦 Build a Docker Image

docker build -t  .

🔥 Build Without Cache

docker build -t  . --no-cache

📂 List Local Images

docker images

🧹 Remove an Image

docker rmi

🧼 Prune Unused Images

docker image prune

🔐 Docker Hub & Authentication

🔑 Login to Docker Hub

docker login -u

🚀 Push Image to Docker Hub

docker push /

🔍 Search for Images

docker search

📥 Pull an Image

docker pull

🧪 Working with Containers

🚀 Run a Container

docker run --name

🌐 Run with Port Mapping

docker run -p :

🕶 Run in Background (Detached Mode)

docker run -d

▶️ Start / ⏹ Stop Container

docker start 
docker stop

🗑 Remove Stopped Container

docker rm

🖥 Access Running Container

docker exec -it  sh

📈 Logs, Stats & Monitoring

📄 View Logs

docker logs -f

🔎 Inspect Container Details

docker inspect

📋 List Running Containers

docker ps

📋 List All Containers

docker ps -a

📊 Monitor Usage Stats

docker container stats

⚙️ Miscellaneous & System Info

🐳 Start Docker Daemon

docker -d

📘 Get Help on Any Command

docker --help

ℹ️ Show Docker System Info

docker info

🔗 Connect with me:

💼 LinkedIn

💻 GitHub