Skip to content
Hands-on IT IT Drills
Cover: Dockerfiles hands-on

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

  1. Foreword
  2. Day 0: The Training Ground
  3. Day 1: The First Dockerfile
  4. Day 2: Instructions in Detail
  5. Day 3: Build Context and .dockerignore
  6. Day 4: Mastering the Layer Cache
  7. Day 5: Multi-Stage Basics – Go to scratch
  8. Day 6: Multi-Stage for Python and Node
  9. Day 7: Advanced Patterns and Multi-Platform
  10. Day 8: Choosing Base Images
  11. Day 9: Hardening
  12. Day 10: Traceable and Verified
  13. Day 11: How Secrets Leak
  14. Day 12: .env, .gitignore and .dockerignore – the Triangle
  15. Day 13: Build Secrets with BuildKit
  16. Day 14: Runtime Secrets
  17. Day 15: Competition – Disaster Drills
  18. Appendix A: Cheat Sheet
  19. Appendix B: Final Exam