This document discusses best practices for writing Dockerfiles. It begins with a refresher on images, Dockerfile build processes, and areas for improvement. Examples are provided of optimizing a sample Dockerfile to improve build caching, reduce image size, and increase reproducibility. Specific techniques covered include ordering commands to leverage caching, using official base images, multi-stage builds, and build arguments. Benchmarks show the optimized Dockerfile builds faster and produces smaller images.