mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-05-29 17:05:46 +08:00
Merge pull request #908 from crazy-max/inline-buildattrs
build: inline buildinfo attrs
This commit is contained in:
commit
e871c39f05
@ -505,6 +505,12 @@ func toSolveOpt(ctx context.Context, d driver.Driver, multiDriver bool, opt Opti
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if e.Type == "docker" || e.Type == "image" || e.Type == "oci" {
|
||||||
|
// inline buildinfo attrs from build arg
|
||||||
|
if v, ok := opt.BuildArgs["BUILDKIT_INLINE_BUILDINFO_ATTRS"]; ok {
|
||||||
|
e.Attrs["buildinfo-attrs"] = v
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
so.Exports = opt.Exports
|
so.Exports = opt.Exports
|
||||||
|
@ -56,6 +56,18 @@ For documentation on most of these flags, refer to the [`docker build`
|
|||||||
documentation](https://docs.docker.com/engine/reference/commandline/build/). In
|
documentation](https://docs.docker.com/engine/reference/commandline/build/). In
|
||||||
here we’ll document a subset of the new flags.
|
here we’ll document a subset of the new flags.
|
||||||
|
|
||||||
|
### Built-in build args
|
||||||
|
|
||||||
|
* `BUILDKIT_INLINE_BUILDINFO_ATTRS=<bool>` inline build info attributes in image config or not
|
||||||
|
* `BUILDKIT_INLINE_CACHE=<bool>` inline cache metadata to image config or not
|
||||||
|
* `BUILDKIT_MULTI_PLATFORM=<bool>` opt into determnistic output regardless of multi-platform output or not
|
||||||
|
|
||||||
|
```shell
|
||||||
|
docker buildx build --build-arg BUILDKIT_MULTI_PLATFORM=1 .
|
||||||
|
```
|
||||||
|
|
||||||
|
Other useful built-in args can be found in [dockerfile frontend docs](https://github.com/moby/buildkit/blob/master/frontend/dockerfile/docs/syntax.md#built-in-build-args).
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
### <a name="allow"></a> Allow extra privileged entitlement (--allow)
|
### <a name="allow"></a> Allow extra privileged entitlement (--allow)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user