BUILDKIT_SANDBOX_HOSTNAME build-arg

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
pull/776/head
CrazyMax 4 years ago
parent 2b18a9b4a5
commit fd59a7b841
No known key found for this signature in database
GPG Key ID: 3248E46B6BB8C7F7

@ -411,6 +411,10 @@ func toSolveOpt(ctx context.Context, d driver.Driver, multiDriver bool, opt Opti
so.FrontendAttrs["multi-platform"] = "true" so.FrontendAttrs["multi-platform"] = "true"
} }
if v, ok := opt.BuildArgs["BUILDKIT_SANDBOX_HOSTNAME"]; ok {
so.FrontendAttrs["hostname"] = v
}
switch len(opt.Exports) { switch len(opt.Exports) {
case 1: case 1:
// valid // valid

@ -317,3 +317,11 @@ with `--allow-insecure-entitlement` (see [`create --buildkitd-flags`](buildx_cre
$ docker buildx create --use --name insecure-builder --buildkitd-flags '--allow-insecure-entitlement security.insecure' $ docker buildx create --use --name insecure-builder --buildkitd-flags '--allow-insecure-entitlement security.insecure'
$ docker buildx build --allow security.insecure . $ docker buildx build --allow security.insecure .
``` ```
### Built-in build args
Special build-time variables (`--build-arg`) for BuildKit are available:
* `BUILDKIT_INLINE_CACHE=<bool>` [exports inline cache metadata](#cache-to) to image configuration or not
* `BUILDKIT_MULTI_PLATFORM=<bool>` opts into determnistic output regardless of multi-platform output or not
* `BUILDKIT_SANDBOX_HOSTNAME=<string>` sets the hostname at build-time (default `buildkitsandbox`)

Loading…
Cancel
Save