Consistent Environments
Docker images package application dependencies so applications can run consistently across development, testing, and production environments.
Understand the core building blocks of Docker. Learn how Docker images and containers work, how they differ, and how to create, run, manage, and remove containers.
Core Concepts
Introduction
A Docker image is a reusable template containing the files, dependencies, configuration, and other components required to run an application.
A Docker container is a runnable instance created from an image. You can create multiple containers from the same image, and each container can run independently.
Understanding this relationship between images and containers is one of the most important foundations for learning Docker.
Why It Matters
Before moving to Dockerfiles, networking, volumes, Docker Compose, or Kubernetes, you should understand how Docker images and containers work together.
Docker images package application dependencies so applications can run consistently across development, testing, and production environments.
Containers provide a portable way to package and run applications across local machines, servers, and cloud environments.
Containers are lightweight compared with running a complete operating system for every application workload.
Understanding images and containers provides an essential foundation for Docker, CI/CD, Kubernetes, and cloud-native development.
Core Concepts
Work through these core concepts to understand how Docker stores, distributes, creates, and manages containerized applications.
Understand Docker images as reusable templates that contain the files, dependencies, configuration, and instructions needed to create containers.
Learn how a Docker container is a runnable instance created from an image and how containers provide isolated environments for applications.
Understand the difference between an image and a container, including how one image can be used to create multiple containers.
Learn how Docker images are built using layers and how layer caching can make image builds more efficient.
Understand image repositories, names, and tags and learn how tags are used to identify different versions of Docker images.
Learn how Docker registries store and distribute images and how you can pull and push images using public or private registries.
Learn how to create and run containers from images and understand the basic configuration options available when starting containers.
Learn how to create, start, stop, restart, inspect, and remove Docker containers.
Understand how applications inside containers can be accessed by publishing container ports to the host system.
Practice listing, inspecting, removing, and managing Docker images and containers using essential Docker CLI commands.
Practice Commands
Practice these commands to work with Docker images and containers.
docker pull nginxDownload the latest Nginx image from the configured Docker registry.
docker imagesList Docker images available on your local system.
docker run nginxCreate and start a container using the Nginx image.
docker psView currently running containers.
docker ps -aView all containers, including stopped containers.
docker stop <container>Stop a running container using its name or ID.
docker rm <container>Remove a stopped container.
docker rmi <image>Remove a Docker image from the local system.
Skills to Learn
These are the essential concepts and commands you should understand before moving to more advanced Docker topics.
Learning Roadmap
Follow this progression to build practical Docker fundamentals.
Learn what a Docker image contains and how images provide the foundation for creating consistent application environments.
Understand how containers are created from images and how they run applications in isolated environments.
Practice downloading an image from a Docker registry and inspecting the images available on your local system.
Create and run containers from Docker images and learn how to view running and stopped containers.
Practice starting, stopping, restarting, inspecting, and removing containers using Docker commands.
Work with real application images and containers before continuing to Dockerfiles, volumes, networking, and Docker Compose.
What's Next?
Once you understand images and containers, continue with building custom images, Dockerfiles, storage, networking, and multi-container applications.
Start Building
Build a strong Docker foundation by understanding how images are created, how containers run applications, and how to manage the complete container lifecycle.