Container vs Virtual Machine
A VM emulates full hardware with its own OS kernel — heavy and slow to start. A container shares the host kernel, isolating only processes and the filesystem. Container startup takes seconds, not minutes.
Key concepts
- Image — an immutable filesystem snapshot built from a Dockerfile
- Container — a running instance of an image
- Dockerfile — build instructions: base image, file copying, commands
- Docker Compose — run multiple containers (app + db + redis) with one command
- Volume — persistent storage outside the container