Docker for Beginners / Chapter 1 — Running containers (lessons 1–5) / Lesson 1

What Docker is

Time needed: about 3 min (estimate)

☆ Read later

You can try the opening of this lesson without an account.

Putting an end to "it works on my machine"

Docker is the tool that puts an application and the environment it needs into a single box you can carry around.

A list of steps in a README depends on the reader's environment.

If they already have a different version of Node.js, or if the PostgreSQL port is taken, that is where they stop.

With Docker, that list of steps becomes one line: docker compose up.

The typical README instructions, and their replacement

# before - whether it works depends on the reader's environment 1. Install Node.js 20 2. Install PostgreSQL 16 3. Create a .env and set DB_HOST 4. Run npm install # with Docker $ docker compose up

How it differs from a virtual machine

Create a free account to keep reading

With an account you can read the rest of this lesson, take the quiz, and read every free lesson in this course. Lessons you answer correctly are recorded as complete.

Report a problem with this lesson

Log in to send a report.

Keyboard shortcuts

Keys available in a lesson
KeyAction
[ or Alt + ←Go to the previous lesson
] or Alt + →Go to the next lesson
?Open this list
EscClose this list

The keys do not work while the cursor is in a code editor or an input field.