Files
Ravi Arnan 92f2efe7a3 buildctl: read a valueless build-arg from the environment
--opt build-arg:FOO failed the whole build with "invalid value
build-arg:FOO" instead of taking FOO from the client environment, so
callers had to spell out --opt build-arg:FOO=$FOO. "docker buildx build
--build-arg FOO" reads the environment, and buildctl already propagates
SOURCE_DATE_EPOCH from the environment into a build arg in loadOptEnv,
so the valueless form was the odd one out.

Resolve it in ParseOpt rather than in attrMap: attrMap is shared with
--local, where a value is still required. A variable that is not present
in the environment is left out of the frontend attributes entirely
rather than sent as an empty string, so a default in the Dockerfile
still applies.

Signed-off-by: Ravi Arnan <raviarnankeren@gmail.com>
2026-08-13 21:41:04 +08:00
..