Home / Docker Beginner
Docker Beginner
Docker packages an app with everything it needs to run, so the same image runs the same way on any machine. Containers, images, volumes, networking, Compose and a shipped Flask app with a database.
Docker packages an app with everything it needs to run, so the same image runs the same way on any machine. This course takes you from your first container to a shipped app with a database, one short lesson at a time.
Course contents
Work top to bottom — the sidebar is the course. Topics later in the list assume the ones before them.
Docker Basics
- What Is Docker?
- What Is a Container?
- Containers vs Virtual Machines
- Docker vs Kubernetes
- Docker Architecture
- What Is Docker Used For?
Install Docker
- Install Docker on Windows
- Install Docker on macOS
- Install Docker on Ubuntu and Linux
- Docker Without sudo
Your First Container
- Run Your First Container
- Run a Web Server in a Container
- Docker Run, Step by Step
- Stop, Start and Remove Containers
- List Containers and Images
Docker Commands
- Docker Pull and Images
- Run Commands Inside a Container
- Docker Logs and Inspect
- Clean Up with Docker Prune
Images and Dockerfile
- What Is a Docker Image?
- Your First Dockerfile
- Dockerfile Instructions
- COPY vs ADD
- Use a .dockerignore File
- Tag and Version Your Images
- Multi-Stage Builds
- Image Layers and the Build Cache
- Dockerfile Best Practices
Volumes and Data
Start: What Are Docker Volumes? ❯Networking
Start: Docker Networking Basics ❯Docker Compose
- What Is Docker Compose?
- Your First Compose File
- Compose Services and depends_on
- Compose Environment and Volumes
- Compose Commands
Registries and Docker Hub
Start: What Is Docker Hub? ❯Debugging and Security
Start: Fix "Cannot Connect to the Docker Daemon" ❯Project: Containerise a Web App
Start: Project: Containerise a Python Web App ❯What you will learn
You will run your first container, build images from Dockerfiles, keep data in volumes, connect containers on networks, and run a whole app with Docker Compose.
You will also fix the two errors every beginner meets: the daemon that cannot be reached, and the permission that is denied.
By the end of the course you will be able to:
- Run, stop, start and remove containers
- Write Dockerfiles and build slim multi-stage images
- Keep data in volumes and bind mounts
- Connect containers on networks
- Run a multi-container app with Docker Compose
- Push an image to a registry and pull it back
How the course works
Every lesson is short, with a focused example first and one exercise at the end. Every closing example was run for real on Docker 29.1.3, and its stated output is the real output.
The course ends with a project: a Python web app with a Postgres database, run with Compose and shipped to a registry.
Frequently asked questions
Do I need Docker installed to follow this course?
Yes, to run the commands yourself. Lessons 7 to 9 cover installing Docker on Windows, macOS and Ubuntu. Every closing example shows the real output, so you can follow along by reading even before you install it.
Can Docker run in the browser on this site?
No. Docker needs a daemon on your own machine, so the Try-it box shows the verified output from a real run instead of running the commands here.
What version of Docker do the examples use?
Docker 29.1.3. The commands work on any recent Docker version.
Is Docker free?
Docker Engine on Linux is free. Docker Desktop is free for personal use, education, and small business use.
Next steps
- What Is Docker? ❯ — Start the course: the problem Docker solves.
- Run Your First Container ❯ — Run hello-world and read its output.
- Project: Containerise a Python Web App ❯ — The capstone: a Flask app in an image.