Index

Free, with Google

Keep going, free.

A free account opens lessons 2 and 3 of every track, 33 more lessons, and keeps your progress and review cards on every device.

Start free with Google

A chalk plan

Open everything on chalk.

Every lesson, board, video, lab and paper, and the full review decks. Yearly is $39/year.

See plansStart free instead

Module 01 · DevOps · Containers & Docker · about 17 min to read

Play it as a journeyTutor comes with a plan

The Recipe (the Dockerfile)

The Recipe
The Recipe · Open board

The same board, now the file that writes the recipe: one line, one layer, and the order is the whole game.

Before you start. You’ve already built an image and watched a container start from it: that image is a stack of layers, frozen once each one is written. This lesson is about the file that writes those layers down, and the habit that decides whether your next build takes three seconds or three minutes.

Lesson 6 of 70 in DevOps

The rest of this lesson is part of a plan.

A plan opens every lesson, board, video, lab and paper on chalk. Yearly is $39/year.

See plansAlready a member? Sign in

Or start free: a free account opens lessons 2 and 3 of every track.

In this lesson

  • 1976: a morning wasted, because nothing said what had changed
  • The click: a Dockerfile skips work the same way, one line at a time
  • The second build: skip what hasn’t changed, in order
  • COPY checks the bytes, RUN checks the words
  • The instructions you’ll actually use
  • The build context: everything in the folder, before anything starts
  • Multi-stage: build heavy, ship light
  • Layers are append-only: what a deleted file actually costs you
  • CMD and ENTRYPOINT: the line that decides your shutdown behaviour

Terms it explains: layer, cache, hit, miss, 4.96 s, 0.72 s, cache key, FROM, WORKDIR, COPY, RUN, CMD / ENTRYPOINT, history entry, build context, `ENTRYPOINT`, `CMD`.

Review DevOps