Dockerfile Build Pitfalls

Use when a Dockerfile is written, reviewed or debugged for build traps that still produce a green build: apt update cached alone and stale installs, a failed stage hidden behind a pipe, a value that survives unset in an ENV layer, --pull versus --no-cache, COPY versus ADD versus a bind mount, base image tags and digests, credentials via ARG, ENV or copied dotfiles instead of build secrets and SSH mounts, .dockerignore limits, entrypoints in shell-less distroless images, users, setuid files, sudo and HEALTHCHECK.

techmefr Updated

File contents

techmefr/mentis commit 4929dd555e

Frequently asked questions

npx get-skill add techmefr/dockerfile-build-pitfalls