Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an option to only warn about missing variables in build section #470

Open
milas opened this issue Oct 13, 2023 · 1 comment
Open

Add an option to only warn about missing variables in build section #470

milas opened this issue Oct 13, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@milas
Copy link
Member

milas commented Oct 13, 2023

When building images with Compose (i.e. docker compose build), you can get warnings in the output like:

WARNING: The "FOO" variable is not set. Defaulting to a blank string.

This warning only makes sense [when building] if the variable is used in the build section (or image since that's the tag that'll be used).

If the variable is only used for things like environment or other runtime options, it doesn't affect the build.

This also applies to buildx bake, which parses Compose files to merge with HCL.

@milas milas added the enhancement New feature or request label Oct 13, 2023
@ndeloof
Copy link
Collaborator

ndeloof commented Apr 17, 2024

This would require docker/compose let the loader know about sections it could ignore. While feasible, this sounds a significant complexity to be added for the benefits of getting rid with a warning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants