Prerequisites
Workshop · 89 words · 1 min read
Docker: Ship the Whole Machine
How containerization solved 'works on my machine' and transformed software delivery forever.
The Dependency Hell
Every developer knows the pain: your app works on your laptop but crashes in production. Different OS versions, different library versions, different configurations. Docker’s answer: package the entire runtime environment — OS filesystem, libraries, language runtime, application code — into a single, portable image.
FROM node:22-alpine
WORKDIR /app
COPY package.json pnpm-lock.yaml ./
RUN corepack enable && pnpm install --frozen-lockfile
COPY . .
RUN pnpm build
CMD ["node", "dist/server.js"]
Layers and Images
Docker builds images in layers, each cached independently. Change your source code? Only the layers after COPY . . rebuild. This caching model made builds fast and images small — a critical enabler for the CI/CD pipelines and microservice architectures that followed.