From 969545cb929b032746fd78056aa1e64b083c7b55 Mon Sep 17 00:00:00 2001 From: jsternberg <1212129+jsternberg@users.noreply.github.com> Date: Tue, 17 Jun 2025 18:01:49 +0000 Subject: [PATCH] vendor: github.com/docker/buildx v0.25.0 Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .../docker/buildx/docs/bake-reference.md | 17 +++++++++++ _vendor/modules.txt | 4 +-- data/buildx/docker_buildx_bake.yaml | 12 +++++--- data/buildx/docker_buildx_build.yaml | 28 ++++++++++++++----- data/buildx/docker_buildx_debug.yaml | 1 - go.mod | 6 ++-- go.sum | 2 ++ 7 files changed, 53 insertions(+), 17 deletions(-) diff --git a/_vendor/github.com/docker/buildx/docs/bake-reference.md b/_vendor/github.com/docker/buildx/docs/bake-reference.md index 5245f611dc3..22592ec373b 100644 --- a/_vendor/github.com/docker/buildx/docs/bake-reference.md +++ b/_vendor/github.com/docker/buildx/docs/bake-reference.md @@ -227,6 +227,8 @@ The following table shows the complete list of attributes that you can assign to | [`description`](#targetdescription) | String | Description of a target | | [`dockerfile-inline`](#targetdockerfile-inline) | String | Inline Dockerfile string | | [`dockerfile`](#targetdockerfile) | String | Dockerfile location | +| [`entitlements`](#targetentitlements) | List | Permissions that the build process requires to run | +| [`extra-hosts`](#targetextra-hosts) | List | Customs host-to-IP mapping | | [`inherits`](#targetinherits) | List | Inherit attributes from other targets | | [`labels`](#targetlabels) | Map | Metadata for images | | [`matrix`](#targetmatrix) | Map | Define a set of variables that forks a target into multiple targets. | @@ -583,6 +585,20 @@ target "integration-tests" { Entitlements are enabled with a two-step process. First, a target must declare the entitlements it requires. Secondly, when invoking the `bake` command, the user must grant the entitlements by passing the `--allow` flag or confirming the entitlements when prompted in an interactive terminal. This is to ensure that the user is aware of the possibly insecure permissions they are granting to the build process. +### `target.extra-hosts` + +Use the `extra-hosts` attribute to define customs host-to-IP mapping for the +target. This has the same effect as passing a [`--add-host`][add-host] flag to +the build command. + +```hcl +target "default" { + extra-hosts = { + my_hostname = "8.8.8.8" + } +} +``` + ### `target.inherits` A target can inherit attributes from other targets. @@ -1422,6 +1438,7 @@ target "webapp-dev" { +[add-host]: https://docs.docker.com/reference/cli/docker/buildx/build/#add-host [attestations]: https://docs.docker.com/build/attestations/ [bake_stdlib]: https://github.com/docker/buildx/blob/master/bake/hclparser/stdlib.go [build-arg]: https://docs.docker.com/reference/cli/docker/image/build/#build-arg diff --git a/_vendor/modules.txt b/_vendor/modules.txt index dcf0aa74f39..4fed5563d33 100644 --- a/_vendor/modules.txt +++ b/_vendor/modules.txt @@ -1,6 +1,6 @@ # github.com/moby/moby v28.2.1+incompatible -# github.com/moby/buildkit v0.22.0 -# github.com/docker/buildx v0.24.0 +# github.com/moby/buildkit v0.23.0 +# github.com/docker/buildx v0.25.0 # github.com/docker/cli v28.2.2+incompatible # github.com/docker/compose/v2 v2.37.1 # github.com/docker/model-cli v0.1.26-0.20250527144806-15d0078a3c01 diff --git a/data/buildx/docker_buildx_bake.yaml b/data/buildx/docker_buildx_bake.yaml index 066d67119da..75bc32558a2 100644 --- a/data/buildx/docker_buildx_bake.yaml +++ b/data/buildx/docker_buildx_bake.yaml @@ -366,12 +366,15 @@ examples: |- ```console $ docker buildx bake --list=variables - VARIABLE VALUE DESCRIPTION - REGISTRY docker.io/username Registry and namespace - IMAGE_NAME my-app Image name - GO_VERSION + VARIABLE TYPE VALUE DESCRIPTION + REGISTRY string docker.io/username Registry and namespace + IMAGE_NAME string my-app Image name + GO_VERSION + DEBUG bool false Add debug symbols ``` + Variable types will be shown when set using the `type` property in the Bake file. + By default, the output of `docker buildx bake --list` is presented in a table format. Alternatively, you can use a long-form CSV syntax and specify a `format` attribute to output the list in JSON. @@ -531,6 +534,7 @@ examples: |- * `context` * `dockerfile` * `entitlements` + * `extra-hosts` * `labels` * `load` * `no-cache` diff --git a/data/buildx/docker_buildx_build.yaml b/data/buildx/docker_buildx_build.yaml index 91aca49cfc8..a77cf15a84e 100644 --- a/data/buildx/docker_buildx_build.yaml +++ b/data/buildx/docker_buildx_build.yaml @@ -703,13 +703,15 @@ examples: |- Define additional build context with specified contents. In Dockerfile the context can be accessed when `FROM name` or `--from=name` is used. When Dockerfile defines a stage with the same name it is overwritten. - The value can be a local source directory, [local OCI layout compliant directory](https://github.com/opencontainers/image-spec/blob/main/image-layout.md), container image (with docker-image:// prefix), Git or HTTP URL. + The value can be a: - Replace `alpine:latest` with a pinned one: + - local source directory + - [local OCI layout compliant directory](https://github.com/opencontainers/image-spec/blob/main/image-layout.md) + - container image + - Git URL + - HTTP URL - ```console - $ docker buildx build --build-context alpine=docker-image://alpine@sha256:0123456789 . - ``` + #### Use a local path {#local-path} Expose a secondary local source directory: @@ -718,6 +720,16 @@ examples: |- # docker buildx build --build-context project=https://github.com/myuser/project.git . ``` + #### Use a container image {#docker-image} + + Use the `docker-image://` scheme. + + Replace `alpine:latest` with a pinned one: + + ```console + $ docker buildx build --build-context alpine=docker-image://alpine@sha256:0123456789 . + ``` + ```dockerfile # syntax=docker/dockerfile:1 FROM alpine @@ -726,7 +738,10 @@ examples: |- #### Use an OCI layout directory as build context {#source-oci-layout} - Source an image from a local [OCI layout compliant directory](https://github.com/opencontainers/image-spec/blob/main/image-layout.md), + Use the `oci-layout:///` scheme. + + Source an image from a local + [OCI layout compliant directory](https://github.com/opencontainers/image-spec/blob/main/image-layout.md), either by tag, or by digest: ```console @@ -744,7 +759,6 @@ examples: |- ``` The OCI layout directory must be compliant with the [OCI layout specification](https://github.com/opencontainers/image-spec/blob/main/image-layout.md). - You can reference an image in the layout using either tags, or the exact digest. ### Override the configured builder instance (--builder) {#builder} diff --git a/data/buildx/docker_buildx_debug.yaml b/data/buildx/docker_buildx_debug.yaml index f9b45c6ad3a..dfb0c5cb0ee 100644 --- a/data/buildx/docker_buildx_debug.yaml +++ b/data/buildx/docker_buildx_debug.yaml @@ -1,7 +1,6 @@ command: docker buildx debug short: Start debugger long: Start debugger -usage: docker buildx debug pname: docker buildx plink: docker_buildx.yaml cname: diff --git a/go.mod b/go.mod index cb860a1bc35..a356c6bd87b 100644 --- a/go.mod +++ b/go.mod @@ -3,17 +3,17 @@ module github.com/docker/docs go 1.24.0 require ( - github.com/docker/buildx v0.24.0 // indirect + github.com/docker/buildx v0.25.0 // indirect github.com/docker/cli v28.2.2+incompatible // indirect github.com/docker/compose/v2 v2.37.1 // indirect github.com/docker/model-cli v0.1.26-0.20250527144806-15d0078a3c01 // indirect github.com/docker/scout-cli v1.15.0 // indirect - github.com/moby/buildkit v0.22.0 // indirect + github.com/moby/buildkit v0.23.0 // indirect github.com/moby/moby v28.2.1+incompatible // indirect ) replace ( - github.com/docker/buildx => github.com/docker/buildx v0.24.0 + github.com/docker/buildx => github.com/docker/buildx v0.25.0 github.com/docker/cli => github.com/docker/cli v28.2.1+incompatible github.com/docker/compose/v2 => github.com/docker/compose/v2 v2.37.1 github.com/docker/model-cli => github.com/docker/model-cli v0.1.26-0.20250527144806-15d0078a3c01 diff --git a/go.sum b/go.sum index 55f92ffe3dc..e9b57fa2de8 100644 --- a/go.sum +++ b/go.sum @@ -18,6 +18,8 @@ github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5Qvfr github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= github.com/docker/buildx v0.24.0 h1:qiD+xktY+Fs3R79oz8M+7pbhip78qGLx6LBuVmyb+64= github.com/docker/buildx v0.24.0/go.mod h1:vYkdBUBjFo/i5vUE0mkajGlk03gE0T/HaGXXhgIxo8E= +github.com/docker/buildx v0.25.0 h1:qs5WxBo0wQKSXcQ+v6UhWaeM2Pu+95ZCymaimRzInaE= +github.com/docker/buildx v0.25.0/go.mod h1:xJcOeBhz49tgqN174MMGuOU4bxNmgfaLnZn7Gm641EE= github.com/docker/cli v28.2.1+incompatible h1:AYyTcuwvhl9dXdyCiXlOGXiIqSNYzTmaDNpxIISPGsM= github.com/docker/cli v28.2.1+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/compose/v2 v2.36.2 h1:rxk1PUUbhbAS6HkGsYo9xUmMBpKtVwFMNCQjE4+i5fk=