Training material
Dockerfiles hands-on
Building lean, secure images
From a naive one-gigabyte image through layer caching, multi-stage builds and hardening to handling secrets properly in .env files, builds and at runtime. Checked with hadolint, BuildKit checks, ShellCheck, Trivy and Dockle, trained with Docker and a local registry on your laptop.
- Dockerfile
- BuildKit
- Multi-Stage
- Build-Secrets
- Trivy
- Dockle
Training plan
- Foreword
- Day 0: The Training Ground
- Day 1: The First Dockerfile
- Day 2: Instructions in Detail
- Day 3: Build Context and .dockerignore
- Day 4: Mastering the Layer Cache
- Day 5: Multi-Stage Basics – Go to scratch
- Day 6: Multi-Stage for Python and Node
- Day 7: Advanced Patterns and Multi-Platform
- Day 8: Choosing Base Images
- Day 9: Hardening
- Day 10: Traceable and Verified
- Day 11: How Secrets Leak
- Day 12: .env, .gitignore and .dockerignore – the Triangle
- Day 13: Build Secrets with BuildKit
- Day 14: Runtime Secrets
- Day 15: Competition – Disaster Drills
- Appendix A: Cheat Sheet
- Appendix B: Final Exam