finds.dev

BretFisher/nodejs-rocks-in-docker

DockerCon "Docker for Node.js" examples

View on GitHub

★ 515DockerfileMITupdated Feb 2026

// the take

This is Bret Fisher's DockerCon talk repo on containerizing Node.js apps — a toy Express app wrapped in a half-dozen Dockerfile variants that demonstrate base-image tradeoffs, multi-stage builds, and Compose v2 patterns. It's for developers who already know Docker basics and want a second opinion on which Node base image to run in production.

The base-image comparison table runs the same Node version through Snyk, Docker Scout, Trivy, and Grype side by side, which is a genuinely useful way to see how much scanners disagree before you pick one number to trust. The repo ships working Dockerfiles for each strategy discussed (ubuntu-copy, NodeSource deb, distroless) so you can diff them directly instead of reconstructing from prose. The production checklist and the depends_on with condition: service_healthy pattern in the Compose file solve real startup-ordering pain that a lot of teams still patch around with sleep scripts.

The CVE and size numbers are a September 2023 snapshot pinned to Node 16/18 and Ubuntu 20.04/22.04 — scanner results and base image sizes drift constantly, so anyone copying these numbers as current guidance rather than as a methodology example will be wrong within months. There's no script in the repo to regenerate the comparison table yourself, so the central argument rests on numbers you can't reproduce or verify against today's images. It's conference material, not a library: nothing to install or pin a version of, and no CI running these Dockerfiles against newer Node/Ubuntu releases to confirm the advice still holds. The app itself (app.js, routes/) is boilerplate Express scaffolding with no real logic — it exists purely as a vehicle for the Docker lessons, so don't expect anything reusable there.

We read the README, the directory tree and a key source file in October 2026. Nobody pays to be listed. How we judge →

// at a glance

Stars
515
Forks
102
Language
Dockerfile
License
MIT
Last commit
20 Feb 2026

// nearby

If nodejs-rocks-in-docker isn't quite it.

All repos →