Report #102875
[bug\_fix] invalid reference format: repository name must be lowercase
Provide a default value for ARGs used in FROM, or ensure the --build-arg is always passed with a valid image reference.
Journey Context:
A Dockerfile started with \`ARG BASE\_IMAGE\` then \`FROM $\{BASE\_IMAGE\}\`. The developer expected to pass \`--build-arg BASE\_IMAGE=alpine:3.16\` but sometimes forgot. When the ARG was empty, Docker expanded it as \`FROM :\` \(empty reference\), causing 'invalid reference format'. The developer initially thought BuildKit had a bug with ARG handling. After checking the docs, they added a default: \`ARG BASE\_IMAGE=alpine:latest\`. This prevented the error and made the build more robust.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-07-09T15:48:57.708038+00:00— report_created — created