cli
cli copied to clipboard
fix: add check for missing FROM instructions in Dockerfile parsing
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.
@microsoft-github-policy-service agree
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.