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 08 · DevOps · Ship it · about 17 min to read

Play it as a journeyTutor comes with a plan

The thin image: container build craft and hardening

The Recipe
The Recipe · Open board

: the recipe board again. This lesson is about what you leave out of the recipe, and what you keep outside the finished image.

Before you start. The Recipe (the Dockerfile) showed that a Dockerfile builds an image one layer at a time, and that Docker reuses a layer only when every line above it is unchanged. It also showed a multi-stage build, where a big first stage compiles the program and a small last stage receives only the result. Running a Container for Real showed that a container is a normal process with a fence around it. Ship it: the line ran the full pipeline for one small service. This lesson goes slower on the three build choices that pipeline made: the base image, the user, and the scan.

Lesson 63 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

  • 26 May 2015: one official image in three carried a known hole
  • Multi-stage: ship the meal, not the kitchen
  • Distroless: a final image with no shell and no package manager
  • Non-root and rootless are two different locks
  • Cache mount: keep the download folder outside the image
  • Scan at build: a known-holes check that can stop the line
  • The full Dockerfile
  • Cache mount options
  • Secrets and SBOMs at build time
  • A linter you can run
  • Edge cases and trade-offs

Terms it explains: distroless, non-root user, rootless, cache mount, CVE, scan, scan gate, Common mistakes, software bill of materials, build context.

Review DevOps