All languages

Docker

You're viewing a free preview. Sign in free to read every script.

Why this exists Most first Dockerfiles install the compiler, the package manager's cache, the test tools and the source code into the same image that runs in production. It works, but the image is larger than it needs…

Production-Ready Multi-Stage Dockerfile Template

A four-stage Dockerfile for a Node.js and TypeScript service (dependencies, build, production dependencies, runtime), built and run for real: what the final image contains, the size it saves, non-root by default, a working healthcheck, and clean shutdown on docker stop.

Sign in free to read this script, along with the rest of the library.

Sign in free