Fun in the RUN instruction: Why container builds with distroless images can surprise you

233 · Red Hat · May 14, 2026, 1:23 p.m.
Summary
The blog post discusses the challenges encountered when building container images with distroless images, particularly when using the RUN instruction in a Containerfile. It highlights the significance of understanding that distroless images do not include shells, which necessitates using exec format for RUN instructions to avoid execution errors. The post provides insights into adapting to this environment for successful builds, drawing on personal experiences and technical lessons learned during the process.