buildkit/InvalidDefaultArgInFrom¶
Using the global ARGs with default values should produce a valid build.
| Property | Value |
|---|---|
| Severity | Error |
| Category | Correctness |
| Default | Enabled |
Description¶
An ARG used in an image reference should be valid when no build arguments are
used. An image build should not require --build-arg to produce a valid build.
If a global ARG has no default value and is interpolated into a FROM
instruction, the resulting image reference may be invalid when the argument is
not supplied at build time.
Examples¶
Bad:
Good:
Good (empty ARG is OK if image is valid with it empty):
Good (default value syntax):