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
Comfort with the terminal makes Docker much easier. Practise basic Linux commands first.
Learn each topic here
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-worldExample
bash
docker run hello-world
docker run -d -p 8080:80 --name web nginx
docker psThese commands test Docker, start an Nginx web server on port 8080 and list running containers.
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
Use docker logs and docker exec often. They are your main debugging tools.
Learn each topic here
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.27Ports
Map a host port to a container port with -p host:container.
bash
docker run -d -p 8080:80 nginx # open http://localhost:8080Environment 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:16Logs
See what a container prints with docker logs; add -f to follow live.
bash
docker logs -f webexec and inspect
exec runs a command inside a running container; inspect shows its full configuration.
bash
docker exec -it web sh
docker inspect webCleaning up
Remove stopped containers, unused images and volumes to free disk space.
bash
docker ps -a
docker rm web
docker system pruneExample
bash
docker run -d --name db -e POSTGRES_PASSWORD=secret -p 5432:5432 postgres:16
docker logs db
docker exec -it db psql -U postgresThis starts PostgreSQL, shows its logs and opens a database shell inside the container.
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
Copy dependency files before your code so Docker can cache the install step.
Learn each topic here
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
.envBase 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.
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
Containers are temporary. Anything important must live in a volume or external storage.
Learn each topic here
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:16Bind 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 devBackups
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.sqlDatabase 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:16The database files live in the pgdata volume, not inside the container.
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
Containers on the same user-defined network can reach each other by name.
Learn each topic here
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 appnetPort 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 myapiThe api container connects to the database using the host name db.
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 is perfect for local development: one command starts your whole stack.
Learn each topic here
compose.yaml
Docker Compose describes multi-container apps in one YAML file.
yaml
services:
web:
build: .
ports: ["3000:3000"]
db:
image: postgres:16Services
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 upExample
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.
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
Never put passwords or API keys inside images. Pass them at runtime instead.
Learn each topic here
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 nodeImage scanning
Scan images for known vulnerabilities with tools like Docker Scout or Trivy before deploying.
bash
trivy image myapp:1.4.0Secrets 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.
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
Tag images with version numbers or commit IDs, not only latest, so you can roll back safely.
Learn each topic here
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.0Tagging 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 1Kubernetes 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.
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.
Static site container
Serve a website with Nginx in Docker.
Database playground
Run PostgreSQL with a volume and sample data.
Containerised API
Dockerfile for your own API with environment variables.
Compose stack
App, database and Redis started with one command.
Optimised image
Multi-stage, non-root image under 100 MB.
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.