cli icon indicating copy to clipboard operation
cli copied to clipboard

fix: add check for missing FROM instructions in Dockerfile parsing

Open krewi1 opened this issue 11 months ago • 1 comments

This fix ensures that the Dockerfile parser checks for the presence of at least one FROM instruction. If no FROM instructions are found, an error is thrown with a clear message, guiding the user to fix the issue by adding a valid FROM statement. This improves robustness and helps users quickly identify and resolve misconfigured or incomplete Dockerfiles.

krewi1 avatar Jan 30 '25 11:01 krewi1

@microsoft-github-policy-service agree

krewi1 avatar Jan 30 '25 11:01 krewi1

Unfortunately this PR actually prevents a legit use case https://github.com/devcontainers/cli/issues/991.

IMO using docker build --check would make better sense than implementing its own checker.

felipecrs avatar Apr 24 '25 09:04 felipecrs