compose-go icon indicating copy to clipboard operation
compose-go copied to clipboard

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

Open milas opened this issue 1 year ago • 1 comments

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 avatar Oct 13 '23 16:10 milas