DevOps and Cloud

Docker Roadmap: Step-by-Step Guide for 2026

This Docker roadmap teaches you how to package and run applications in containers, from core concepts and Dockerfiles to Compose, networking, security and production use, step by step.

Steps8Time2 to 3 monthsLevelBeginner to job-ready

What is a Docker Engineer?

Docker is a tool that packages an application with everything it needs (code, runtime, libraries and settings) into a container that runs the same way on any machine. A Docker engineer builds, runs and manages these containers.

Docker skills are used by backend developers, DevOps engineers, cloud engineers and data engineers. Containers are the foundation for tools such as Kubernetes and most modern cloud deployments.

How to use this Docker roadmap

Follow this Docker roadmap step by step and run every command yourself. Docker is learned best by doing.

Containerise one of your own projects as you go, such as a small web app with a database.

1Step 1: Containers and Linux basics

Understand what containers are and the Linux skills you need.

What is it?

A container is a lightweight, isolated environment for an app. Unlike a virtual machine, it shares the host operating system, so it starts in seconds.

What to learn

Containers vs virtual machinesImages and containersLinux command lineProcesses and portsInstalling Docker

Comfort with the terminal makes Docker much easier. Practise basic Linux commands first.

Learn each topic here

Tap a topic to open a full explanation with examples, no need to go anywhere else.
Containers vs virtual machines

A virtual machine runs a full operating system, which is heavy and slow to start. A container shares the host’s kernel and packages only the app and its libraries, so it starts in seconds and uses far less memory.

Images and containers

An image is a read-only template (like a recipe). A container is a running instance of an image (the cooked dish). You can run many containers from one image.

Linux command line

Containers are usually Linux. Know ls, cd, cat, ps, env and package managers like apt or apk.

Processes and ports

Each container runs a main process. Apps listen on ports (like 3000 or 5432) inside the container, which you publish to the host to access them.

Installing Docker

Install Docker Desktop on Windows or Mac, or Docker Engine on Linux, then test it.

bash

docker --version
docker run hello-world

Example

bash

docker run hello-world
docker run -d -p 8080:80 --name web nginx
docker ps

These commands test Docker, start an Nginx web server on port 8080 and list running containers.

Practice project: Install Docker and run your first container.

Helpful resource: Docker: Get started

2Step 2: Working with images and containers

Pull, run, inspect and manage containers.

What is it?

Images are templates; containers are running copies of images. You can start, stop, inspect and remove containers freely.

What to learn

docker pull and runPortsEnvironment variablesLogsexec and inspectCleaning up

Use docker logs and docker exec often. They are your main debugging tools.

Learn each topic here

Tap a topic to open a full explanation with examples, no need to go anywhere else.
docker pull and run

pull downloads an image; run starts a container from it.

bash

docker pull nginx:1.27
docker run -d --name web nginx:1.27
Ports

Map a host port to a container port with -p host:container.

bash

docker run -d -p 8080:80 nginx   # open http://localhost:8080
Environment variables

Pass settings like passwords and URLs to containers with -e or an env file, instead of hard-coding them.

bash

docker run -e POSTGRES_PASSWORD=secret postgres:16
Logs

See what a container prints with docker logs; add -f to follow live.

bash

docker logs -f web
exec and inspect

exec runs a command inside a running container; inspect shows its full configuration.

bash

docker exec -it web sh
docker inspect web
Cleaning up

Remove stopped containers, unused images and volumes to free disk space.

bash

docker ps -a
docker rm web
docker system prune

Example

bash

docker run -d --name db -e POSTGRES_PASSWORD=secret -p 5432:5432 postgres:16
docker logs db
docker exec -it db psql -U postgres

This starts PostgreSQL, shows its logs and opens a database shell inside the container.

Practice project: Run a PostgreSQL container with a password and connect to it.

Helpful resource: Docker CLI reference

3Step 3: Writing Dockerfiles

Build your own images for your applications.

What is it?

A Dockerfile is a recipe of instructions that Docker follows to build an image.

What to learn

FROM, COPY, RUN, CMDLayers and caching.dockerignoreBase imagesTags

Copy dependency files before your code so Docker can cache the install step.

Learn each topic here

Tap a topic to open a full explanation with examples, no need to go anywhere else.
FROM, COPY, RUN, CMD

The main Dockerfile instructions: FROM picks a base image, COPY adds files, RUN executes build commands and CMD sets the start command.

dockerfile

FROM python:3.12-slim
COPY . /app
RUN pip install -r /app/requirements.txt
CMD ["python", "/app/main.py"]
Layers and caching

Each instruction creates a layer. Docker reuses unchanged layers, so copy dependency files and install them before copying your code to speed up rebuilds.

.dockerignore

.dockerignore excludes files like node_modules, .git and .env from the image, keeping it small and safe.

text

node_modules
.git
.env
Base images

Choose official, minimal base images (alpine, slim, distroless) to reduce size and security risks.

Tags

Tags label image versions, like myapp:1.4.0. Avoid relying only on latest.

bash

docker build -t myapp:1.4.0 .

Example

dockerfile

FROM node:20-alpine
WORKDIR /app
COPY package*.json ./
RUN npm ci --omit=dev
COPY . .
EXPOSE 3000
CMD ["node", "server.js"]

This builds a small Node.js image: install dependencies first, then copy code and start the server.

Practice project: Write a Dockerfile for a Node.js or Python app and build it.

Helpful resource: Dockerfile reference

4Step 4: Volumes and data

Keep data safe when containers are replaced.

What is it?

Volumes store data outside the container’s life cycle, so it is kept when containers are deleted or updated.

What to learn

Named volumesBind mountsBackupsDatabase datatmpfs

Containers are temporary. Anything important must live in a volume or external storage.

Learn each topic here

Tap a topic to open a full explanation with examples, no need to go anywhere else.
Named volumes

Named volumes store data managed by Docker that survives container removal, ideal for databases.

bash

docker volume create pgdata
docker run -v pgdata:/var/lib/postgresql/data postgres:16
Bind mounts

Bind mounts link a folder on your computer into the container, great for live code editing in development.

bash

docker run -v $(pwd):/app node:20 npm run dev
Backups

Back up volume data by running a temporary container that archives it, or use the database’s own dump tools.

bash

docker exec db pg_dump -U postgres shop > backup.sql
Database data

Always store database files in volumes, never only inside the container, or data is lost when the container is replaced.

tmpfs

tmpfs mounts store temporary data in memory only, useful for sensitive or throwaway files.

Example

bash

docker volume create pgdata
docker run -d --name db -e POSTGRES_PASSWORD=secret \
  -v pgdata:/var/lib/postgresql/data postgres:16

The database files live in the pgdata volume, not inside the container.

Practice project: Run PostgreSQL with a named volume, delete the container and confirm the data survives.

Helpful resource: Docker volumes

5Step 5: Networking

Connect containers to each other and to the outside world.

What is it?

Docker networks let containers communicate. On a custom network, each container can be reached using its name.

What to learn

Bridge networksPort publishingContainer DNSHost networkReverse proxies

Containers on the same user-defined network can reach each other by name.

Learn each topic here

Tap a topic to open a full explanation with examples, no need to go anywhere else.
Bridge networks

The default network type for containers on one host. On a custom bridge network, containers can talk to each other by name.

bash

docker network create appnet
Port publishing

Publishing exposes a container port on the host so outside users can reach it. Only publish what needs to be public.

Container DNS

On user-defined networks, Docker provides DNS so a container named db is reachable at host name db.

Host network

Host networking makes the container use the host’s network directly (Linux only). It is fast but less isolated.

Reverse proxies

A reverse proxy (Nginx, Traefik, Caddy) receives web traffic and routes it to the right container, often handling HTTPS too.

Example

bash

docker network create appnet
docker run -d --name db --network appnet -e POSTGRES_PASSWORD=secret postgres:16
docker run -d --name api --network appnet -e DB_HOST=db -p 3000:3000 myapi

The api container connects to the database using the host name db.

Practice project: Connect an app container to a database container on a custom network.

Helpful resource: Docker networking

6Step 6: Docker Compose

Run multi-container apps with one file.

What is it?

Docker Compose describes all services of an app in a YAML file and starts them together.

What to learn

compose.yamlServicesdepends_onEnvironment filesProfiles

Compose is perfect for local development: one command starts your whole stack.

Learn each topic here

Tap a topic to open a full explanation with examples, no need to go anywhere else.
compose.yaml

Docker Compose describes multi-container apps in one YAML file.

yaml

services:
  web:
    build: .
    ports: ["3000:3000"]
  db:
    image: postgres:16
Services

Each service in Compose is one container type (web, db, cache), with its image, ports, volumes and environment.

depends_on

depends_on controls start order, for example starting the database before the app. Add health checks to wait until it is actually ready.

Environment files

Keep variables in a .env file that Compose reads automatically, and do not commit secrets to Git.

Profiles

Profiles let you start optional services only when needed, such as debugging tools.

bash

docker compose --profile debug up

Example

yaml

services:
  api:
    build: .
    ports: ["3000:3000"]
    environment:
      DB_HOST: db
    depends_on: [db]
  db:
    image: postgres:16
    environment:
      POSTGRES_PASSWORD: secret
    volumes: [pgdata:/var/lib/postgresql/data]
volumes:
  pgdata:

Running docker compose up starts both the API and database with networking set up.

Practice project: Write a Compose file for a web app, database and cache.

Helpful resource: Docker Compose

7Step 7: Image optimisation and security

Build small, fast and secure images.

What is it?

Multi-stage builds use one stage to build the app and a smaller final stage to run it, leaving build tools behind.

What to learn

Multi-stage buildsSlim base imagesNon-root usersImage scanningSecrets handling

Never put passwords or API keys inside images. Pass them at runtime instead.

Learn each topic here

Tap a topic to open a full explanation with examples, no need to go anywhere else.
Multi-stage builds

Use one stage to build and a smaller final stage to run, leaving compilers and dev files behind.

Slim base images

Slim and alpine images are much smaller, which means faster downloads and fewer vulnerabilities.

Non-root users

Run containers as a non-root user so a security breach has less power.

dockerfile

USER node
Image scanning

Scan images for known vulnerabilities with tools like Docker Scout or Trivy before deploying.

bash

trivy image myapp:1.4.0
Secrets handling

Never bake passwords or keys into images. Pass them at runtime through environment variables, Docker secrets or a cloud secrets manager.

Example

dockerfile

FROM node:20 AS build
WORKDIR /app
COPY . .
RUN npm ci && npm run build

FROM node:20-alpine
WORKDIR /app
COPY --from=build /app/dist ./dist
USER node
CMD ["node", "dist/server.js"]

The final image contains only the built app and runs as the non-root node user.

Practice project: Reduce the size of your image with a multi-stage build and run it as a non-root user.

Helpful resource: Docker build best practices

8Step 8: Registries, CI/CD and production

Ship containers to servers and the cloud.

What is it?

A registry stores images. CI/CD pipelines build and push new images automatically on every code change.

What to learn

Docker Hub and private registriesTagging strategyCI pipelinesHealth checksKubernetes basics

Tag images with version numbers or commit IDs, not only latest, so you can roll back safely.

Learn each topic here

Tap a topic to open a full explanation with examples, no need to go anywhere else.
Docker Hub and private registries

Registries store and share images. Docker Hub is public; private registries (GitHub Container Registry, AWS ECR) are used for company images.

bash

docker push ghcr.io/me/myapp:1.4.0
Tagging strategy

Tag images with version numbers or Git commit IDs so you know exactly what is running and can roll back.

CI pipelines

CI pipelines (GitHub Actions, GitLab CI) build, test and push images automatically on every change.

Health checks

Health checks tell Docker or Kubernetes whether the app inside is working, so broken containers are restarted.

dockerfile

HEALTHCHECK CMD curl -f http://localhost:3000/health || exit 1
Kubernetes basics

Kubernetes runs containers across many servers with scaling and self-healing. See our Kubernetes roadmap.

Example

yaml

- uses: docker/build-push-action@v6
  with:
    push: true
    tags: myuser/myapi:${{ github.sha }}

This GitHub Actions step builds the image and pushes it tagged with the commit ID.

Practice project: Build and push your image with GitHub Actions and deploy it to a cloud server.

Helpful resource: Docker with GitHub Actions

Docker roadmap project ideas

Projects turn what you learn into real skills. Build at least one project from each level below, and put every finished project on GitHub with a clear README.

Beginner

Static site container

Serve a website with Nginx in Docker.

Beginner

Database playground

Run PostgreSQL with a volume and sample data.

Intermediate

Containerised API

Dockerfile for your own API with environment variables.

Intermediate

Compose stack

App, database and Redis started with one command.

Advanced

Optimised image

Multi-stage, non-root image under 100 MB.

Advanced

CI/CD deployment

Automatic build, push and deploy pipeline.

Tips to finish this docker roadmap

  • Learn by building. Spend at least two thirds of your study time writing code and making projects, not watching videos.
  • Be consistent. One focused hour every day beats a long session once a week. Small daily progress adds up quickly.
  • Share your work. Post your projects on GitHub and LinkedIn. It builds your confidence and helps recruiters find you.
  • Ask for feedback. Join a community, ask questions and review other people’s code. Explaining things to others is one of the fastest ways to learn.
  • Do not chase every new tool. The fundamentals in this docker roadmap change slowly. Master them first, then explore new libraries.

Career paths and next steps

After this Docker roadmap, you will be ready for junior DevOps, cloud or backend roles that use containers. The natural next step is Kubernetes for running containers at scale.

Continue with the DevOps engineer roadmap or the AWS roadmap.

Related roadmaps

Docker Roadmap FAQs

Is Docker hard to learn?

The basics can be learned in a few days. Production topics such as security and networking take more practice.

Do I need Linux to learn Docker?

Docker Desktop works on Windows and macOS, but basic Linux command-line skills help a lot.

What is the difference between Docker and Kubernetes?

Docker builds and runs containers. Kubernetes manages many containers across many servers.

Is Docker still relevant?

Yes. Containers remain a standard way to package and deploy applications.