Docker
Packages an application and its dependencies into a portable container.
CurrentintermediateGuide only -- no course yet
Overview
Docker packages an application with its exact dependencies and runtime into a container -- a lightweight, isolated unit that runs identically across a developer's laptop, CI, and production, solving the classic 'works on my machine' problem.
- What it is
- A platform for packaging and running applications in isolated, portable containers.
- Why it's used
- It guarantees the environment an app runs in is identical everywhere -- no more dependency-version mismatches between machines.
- Where it fits
- The unit of deployment underneath most modern cloud/Kubernetes workflows.
Core concepts
- Images and containers
- Dockerfiles
- Layers and caching
- Volumes and networking
Example
A Dockerfile is a recipe: each instruction adds a layer, building up exactly the environment the app needs, reproducibly, from a known base image.
FROM node:22-slim
WORKDIR /app
COPY package.json .
RUN npm install
COPY . .
CMD ["node", "server.js"]Common use cases
- Consistent local development environments
- Deploying applications to any cloud
- The foundation Kubernetes orchestrates
Project ideas
- Write a Dockerfile for a small Node.js or Python script and run it in a container