Master Docker Fast: Essential Basic Commands with Examples

Logan Jul 13, 2026

Docker, an open-source platform, has revolutionized the way we manage and deploy applications. It uses containerization to enable developers to create, deploy, and run applications with consistency and scalability. To make the most of Docker, let's dive into some basic commands and examples.

the docker command chart is shown in red and purple colors, with text below it
the docker command chart is shown in red and purple colors, with text below it

Whether you're a seasoned developer or just starting out, understanding Docker commands is essential. Let's begin our journey with the basics.

Essential Docker Commands
Essential Docker Commands

Docker Basics

Before we delve into commands, let's ensure Docker is installed on your machine. Use the following command to check the version:

100 Docker Basic Commands with Examples
100 Docker Basic Commands with Examples

docker --version

The output should display the version of Docker installed. If Docker is not installed, download and install it from the official website.

Essential Docker Commands
Essential Docker Commands

Now, let's start exploring Docker commands.

Pulling a Docker Image

Docker uses images as the foundation of containers. You can pull images from the Docker registry using the docker pull command. For example, to pull the latest Ubuntu image:

Activity | Nitin Gupta | LinkedIn
Activity | Nitin Gupta | LinkedIn

docker pull ubuntu:latest

This command will download the Ubuntu image and save it locally. The latest tag refers to the newest version of Ubuntu.

Listing Docker Images

the docker commands poster is shown
the docker commands poster is shown

To view the images you've pulled, use the docker images command:

docker images

⌨️ Essential Docker Commands: A Quick Reference Guide 🚀
⌨️ Essential Docker Commands: A Quick Reference Guide 🚀
the docker commands mindmap is shown in this graphic above it's description
the docker commands mindmap is shown in this graphic above it's description
Docker Explained Simply Containers, Images, Commands & Why Every Developer Needs It
Docker Explained Simply Containers, Images, Commands & Why Every Developer Needs It
30 DOCKER COMMANDS EVERY DEVELOPER SHOULD KNOW
30 DOCKER COMMANDS EVERY DEVELOPER SHOULD KNOW
Akash Kumar on LinkedIn: Most Commonly Used Docker Commands CheatSheet  🐳 As Docker gains… | 17 comments
Akash Kumar on LinkedIn: Most Commonly Used Docker Commands CheatSheet 🐳 As Docker gains… | 17 comments
the docker chat sheet is shown in blue and black, with text on it
the docker chat sheet is shown in blue and black, with text on it
Essential Docker Compose Commands: A Quick Guide 🚀
Essential Docker Compose Commands: A Quick Guide 🚀
the docker components flow chart
the docker components flow chart
Docker cheat sheet
Docker cheat sheet
Top 12 Docker Commands Every Developer Should Know
Top 12 Docker Commands Every Developer Should Know
Docker
Docker
an info sheet with the words important docker commands and icons in blue on it
an info sheet with the words important docker commands and icons in blue on it
⌨️ Essential Docker Commands to Interact Inside Containers
⌨️ Essential Docker Commands to Interact Inside Containers
Docker Commands
Docker Commands
Live Courses on Data Science, AI & DSA | Tutort Academy
Live Courses on Data Science, AI & DSA | Tutort Academy
the top ten commandments in doctor who are you looking for? infographical poster
the top ten commandments in doctor who are you looking for? infographical poster
MongoDB + Docker — Quick Setup in 5 Minutes (Visual Command Guide)
MongoDB + Docker — Quick Setup in 5 Minutes (Visual Command Guide)
Docker commands Cheat Sheet
Docker commands Cheat Sheet
Docker container mastery roadmap
Docker container mastery roadmap
the docker complete roadmap is shown in this graphic above it's description
the docker complete roadmap is shown in this graphic above it's description

This will display a list of images along with their names, tags, and sizes.

In the next section, we'll explore how to create and manage containers using these images.

Creating and Managing Containers

Containers are created from Docker images. You can create, start, stop, and remove containers using the following commands.

Creating a Docker Container

To create a new container from an image, use the docker run command. For example, to create a new container from the Ubuntu image:

docker run -it --name my_ubuntu_container ubuntu:latest bash

The -it flag makes the container interactive and allocates a TTY. The --name flag assigns a name to the container. The command then starts the container and drops you into a bash shell.

Listing and Inspecting Docker Containers

To view running containers, use:

docker ps

To view all containers, including stopped ones, use:

docker ps -a

To inspect a container's details, such as its configuration and status, use:

docker inspect my_ubuntu_container

Replace my_ubuntu_container with the name of your container.

In the final part, let's explore how to start, stop, and remove containers.

Starting, Stopping, and Removing Containers

Unlike other commands, these operations are not reversible. So, use them judiciously.

Starting, Stopping, and Removing a Container

To start a container, use:

docker start my_ubuntu_container

To stop a running container, use:

docker stop my_ubuntu_container

To remove (delete) a container, use:

docker rm my_ubuntu_container

With these commands, you can now manage your containers effectively.

Docker provides a powerful platform for application development and deployment. Understanding and mastering these basic commands is the first step towards harnessing Docker's full potential. Remember to always practice caution while working with Docker, as containers can impact your system's performance. Happy containerizing!