• Latest
  • Trending
  • All
Docker whale logo for beginner-friendly Docker commands cheat sheet

20 Essential Docker Commands: A Complete Beginner-Friendly Cheat Sheet

August 29, 2025
Awk in Linux

AWK in Linux: 10 Powerful Examples of the AWK Command (Complete Guide)

August 31, 2025
python packages

Best Python Packages and Libraries Every Developer Should Know in 2025

August 24, 2025
find command in Linux

Find Command in Linux: 20 Practical Examples to Find Files Fast

August 24, 2025
grep command in Linux

The Ultimate Guide to Using the Powerful grep Command in Linux (With Examples)

August 26, 2025
linux hidden files

Linux Hidden Files Explained: How to Find, Create, and Use Them

August 21, 2025
  • Cloud Computing
    • Homes
    • AWS
    • Azure
    • Cloud Tutorials
    • Google Cloud
  • DevOps & Automation
    • Automation Scripts & Tools
    • CI/CD
    • Infrastructure as Code
    • Kubernetes & Containers
  • Infrastructure & Networking
    • Cybersecurity
      • Best Practices & Tutorials
      • Security Tools
      • Threats & Vulnerabilities
    • Firewalls & VPN
    • Network Security
    • Network Tools & Protocols
    • Routing & Switching
  • Linux & Systems
    • Linux Administration
    • Shell Scripting
    • Systems Tutorials
  • Programming & Development
    • APIs & Microservices
    • JavaScript
    • Programming Tutorials
    • Python
  • Tech News
    • Emerging Technologies
    • Industry News
    • Market Trends
Thursday, October 30, 2025
  • Login
my logo
No Result
View All Result
No Result
View All Result
Home DevOps & Automation Kubernetes & Containers

20 Essential Docker Commands: A Complete Beginner-Friendly Cheat Sheet

by Chuck E.
August 29, 2025
in Kubernetes & Containers
0
Docker whale logo for beginner-friendly Docker commands cheat sheet

Table of Contents

Toggle
  • What is Docker and Why Use It?
  •  
  • Docker Commands List
    • docker run
    • docker exec
    • docker ps
    • docker stop
    • docker start
    • docker restart
    • docker logs
    • docker rm
    • docker rmi
    • docker images
    • docker pull
    • docker build
    • docker network ls
    • docker volume ls
    • docker volume create
    • docker inspect
    • docker-compose up
    • docker-compose down
  • Closing Thoughts on Docker Commands
  • Prefer to watch instead?
    • RUN Docker Containers LIKE A PRO With Easy Log Checks And Commands
    • Mastering Docker Made EASY for Beginners
    • Monitor Your Docker Container Resources LIKE A PRO!
    • How to Use Docker Volumes to Persist Data | Beginner Docker Tutorial

What is Docker and Why Use It?

Docker commands are the foundation of working with containers. They let you build, run, and manage applications in a consistent and portable way. Docker itself is an open-source platform that packages code, libraries, and dependencies together so your app runs reliably across different systems.

Without Docker, developers often face the “it works on my machine” problem. By using containers, teams can avoid conflicts between environments, simplify deployments, and scale applications more efficiently.

In this guide, you’ll learn 20 essential Docker commands. Whether you’re a beginner or just need a refresher, this Docker commands cheat sheet will be your go-to reference.

You can read more about Docker at Official Docker website
Equally necessary for Docker users is the grep command, which you can read about here

 

Docker Commands List

docker run

The docker run command creates and starts a container from a specified image. It’s the foundation of running applications inside Docker. In the example below, ubuntu is the image being run.

Example:


docker run ubuntu

docker exec

The docker exec command allows you to run a command inside an already running container. It’s commonly used to open a shell or run scripts.

Example:


docker exec -it container_name bash

docker ps

The docker ps command lists all running containers. It shows container IDs, names, status, ports, and other important details.

Example:


docker ps

docker stop

The docker stop command gracefully stops a running container by sending a termination signal. It’s often used when you need to pause services.

Example:


docker stop container_name

docker start

The docker start command starts an existing container that was previously stopped. It doesn’t create a new container, only restarts an old one.

Example:


docker start container_name

docker restart

The docker restart command stops and then restarts a container in a single step. It’s useful when applying changes or debugging applications.

Example:


docker restart container_name

docker logs

The docker logs command retrieves logs from a container, helping you troubleshoot issues and see application output.

Example:


docker logs container_name

docker rm

The docker rm command removes a container that you no longer need. You can remove multiple containers at once.

Example:


docker rm container_name

docker rmi

The docker rmi command removes an image from your local machine. It helps free up space and keep your environment clean.

Example:


docker rmi ubuntu

docker images

The docker images command lists all images stored locally. It shows image IDs, tags, and sizes.

Example:


docker images

docker pull

The docker pull command downloads an image from Docker Hub or another registry. It’s the way to get new images before running them.

Example:


docker pull ubuntu

docker build

The docker build command creates a Docker image from a Dockerfile. It’s how you package your own applications into images.

Example:


docker build -t myimage .

docker network ls

The docker network ls command lists all available Docker networks. Networks allow containers to communicate with each other.

Example:


docker network ls

docker volume ls

The docker volume ls command lists all Docker volumes. Volumes are used to persist data outside of containers.

Example:


docker volume ls

docker volume create

The docker volume create command creates a new volume that can be mounted to containers for data storage.

Example:


docker volume create myvolume

docker inspect

The docker inspect command returns detailed low-level information about a container or image in JSON format.

Example:


docker inspect container_name

docker-compose up

The docker-compose up command starts all services defined in a docker-compose.yml file. It’s useful for multi-container applications.

Example:


docker-compose up

docker-compose down

The docker-compose down command stops and removes containers, networks, and volumes created by docker-compose up.

Example:


docker-compose down

Closing Thoughts on Docker Commands

Docker has transformed the way developers and DevOps teams build and deploy applications. This Docker commands cheat sheet highlights the most essential commands you’ll use daily.

Now it’s your turn:
👉 Which Docker commands do you use most often?
👉 Did we miss any of your favorite basic Docker commands?

Drop your thoughts in the comments — your input could help other readers discover even more useful Docker commands.

Prefer to watch instead?

RUN Docker Containers LIKE A PRO With Easy Log Checks And Commands

Mastering Docker Made EASY for Beginners

Monitor Your Docker Container Resources LIKE A PRO!

How to Use Docker Volumes to Persist Data | Beginner Docker Tutorial

Chuck E.

Chuck E.

  • Trending
  • Comments
  • Latest
python packages

Best Python Packages and Libraries Every Developer Should Know in 2025

August 24, 2025
find command in Linux

Find Command in Linux: 20 Practical Examples to Find Files Fast

August 24, 2025
grep command in Linux

The Ultimate Guide to Using the Powerful grep Command in Linux (With Examples)

August 26, 2025
linux hidden files

Linux Hidden Files Explained: How to Find, Create, and Use Them

1
find command in Linux

Find Command in Linux: 20 Practical Examples to Find Files Fast

1
grep command in Linux

The Ultimate Guide to Using the Powerful grep Command in Linux (With Examples)

0
Awk in Linux

AWK in Linux: 10 Powerful Examples of the AWK Command (Complete Guide)

August 31, 2025
Docker whale logo for beginner-friendly Docker commands cheat sheet

20 Essential Docker Commands: A Complete Beginner-Friendly Cheat Sheet

August 29, 2025
python packages

Best Python Packages and Libraries Every Developer Should Know in 2025

August 24, 2025

Contact Us – ZekByte

Have questions, feedback, or want to collaborate?

We’d love to hear from you!

At ZekByte, we value every comment, suggestion, and partnership opportunity. Whether you’re reaching out for technical support, content feedback, business inquiries, or just to say hi — feel free to use the form below or contact us directly.

📩 Email: zekbytecompany.com
🌐 Website: https://zekbyte.com
📱 Follow us on:
    • YouTube
    • Twitter / X

About ZekByte

ZekByte is a tech blog dedicated to practical tutorials on cloud computing, automation, DevOps, and real-world programming. Our mission is to help you learn and apply tech skills that matter — fast, focused, and hands-on.

Explore our content on AWS, Azure, Python, Terraform, and more.

📺 YouTube: @ZekByte
📩 Contact: zekbytecompany@gmail.com

  • Home
  • Privacy Policy
  • U.S. Privacy Rights (Including CCPA)

Copyright © 2025 ZekByte

Welcome Back!

Login to your account below

Forgotten Password?

Retrieve your password

Please enter your username or email address to reset your password.

Log In
No Result
View All Result
  • Home
  • Privacy Policy
  • U.S. Privacy Rights (Including CCPA)

Copyright © 2025 ZekByte