Course → 2 · CI/CD & platforms → Docker & containers
2 · CI/CD & platforms
Theory · Docker & containers
20 min · Module 6 · Theory
How to study this topic
- Read the theory below (concepts, bullets, and shell/YAML examples).
- Try the Exam pool and Book quizzes in this module.
- After each quiz, use Show answer on every question to review.
Docker & containers
Containers package apps with dependencies. Images are built from Dockerfiles; registries store immutable tags. docker-compose orchestrates multi-container dev stacks.
- Layers: cached steps speed rebuilds — order Dockerfile instructions wisely.
- .dockerignore: exclude node_modules, .git from build context.
- Networks & volumes: isolate services; persist data outside container lifecycle.
Shell, YAML & config examples
docker build -t myapp:1.0 .
docker run -d -p 8080:8080 --name api myapp:1.0
docker logs -f api
docker exec -it api sh
Hands-on practice: /lab/