From 527b27f1fce442d2bf216071c3bc154867267e6a Mon Sep 17 00:00:00 2001 From: David Karlsson <35727626+dvdksn@users.noreply.github.com> Date: Thu, 24 Aug 2023 13:36:36 +0200 Subject: [PATCH] chore: update vendor Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com> --- .../compose-spec/compose-spec/05-services.md | 30 +++- .../compose-spec/compose-spec/06-networks.md | 2 +- .../compose-spec/compose-spec/07-volumes.md | 2 +- .../compose-spec/compose-spec/08-configs.md | 3 - .../compose-spec/compose-spec/13-merge.md | 3 +- .../compose-spec/compose-spec/build.md | 133 ++++++++---------- .../compose-spec/compose-spec/deploy.md | 43 +++--- .../moby/buildkit/docs/buildkitd.toml.md | 10 +- .../frontend/dockerfile/docs/reference.md | 17 +-- _vendor/modules.txt | 4 +- go.mod | 4 +- go.sum | 8 ++ 12 files changed, 129 insertions(+), 130 deletions(-) diff --git a/_vendor/github.com/compose-spec/compose-spec/05-services.md b/_vendor/github.com/compose-spec/compose-spec/05-services.md index e8ca68b239..8022561de4 100644 --- a/_vendor/github.com/compose-spec/compose-spec/05-services.md +++ b/_vendor/github.com/compose-spec/compose-spec/05-services.md @@ -29,7 +29,7 @@ The default service configuration is `attach: true`. ### build -`build` specifies the build configuration for creating a container image from source, as defined in the [Compsoe Build Specification](build.md). +`build` specifies the build configuration for creating a container image from source, as defined in the [Compose Build Specification](build.md). ### blkio_config @@ -541,11 +541,31 @@ empty or undefined. #### Env_file format -Each line in an `.env` file must be in `VAR[=[VAL]]` format. Lines beginning with `#` are ignored. -Blank lines are also ignored. +Each line in an `.env` file must be in `VAR[=[VAL]]` format. The following syntax rules apply: -The value of `VAL` is used as a raw string and not modified at all. If the value is surrounded by quotes, as is often the case for shell variables, the quotes are included in the value passed to containers -created by Compose. +- Lines beginning with `#` are processed as comments and ignored. +- Blank lines are ignored. +- Unquoted and double-quoted (`"`) values have [parameter expansion](#parameter-expansion) applied. +- Each line represents a key-value pair. Values can optionally be quoted. + - `VAR=VAL` -> `VAL` + - `VAR="VAL"` -> `VAL` + - `VAR='VAL'` -> `VAL` +- Inline comments for unquoted values must be preceded with a space. + - `VAR=VAL # comment` -> `VAL` + - `VAR=VAL# not a comment` -> `VAL# not a comment` +- Inline comments for quoted values must follow the closing quote. + - `VAR="VAL # not a comment"` -> `VAL # not a comment` + - `VAR="VAL" # comment` -> `VAL` +- Single-quoted (`'`) values are used literally. + - `VAR='$OTHER'` -> `$OTHER` + - `VAR='${OTHER}'` -> `${OTHER}` +- Quotes can be escaped with `\`. + - `VAR='Let\'s go!'` -> `Let's go!` + - `VAR="{\"hello\": \"json\"}"` -> `{"hello": "json"}` +- Common shell escape sequences including `\n`, `\r`, `\t`, and `\\` are supported in double-quoted values. + - `VAR="some\tvalue"` -> `some value` + - `VAR='some\tvalue'` -> `some\tvalue` + - `VAR=some\tvalue` -> `some\tvalue` `VAL` may be omitted, in such cases the variable value is an empty string. `=VAL` may be omitted, in such cases the variable is unset. diff --git a/_vendor/github.com/compose-spec/compose-spec/06-networks.md b/_vendor/github.com/compose-spec/compose-spec/06-networks.md index 2c167c52f0..15156eed4f 100644 --- a/_vendor/github.com/compose-spec/compose-spec/06-networks.md +++ b/_vendor/github.com/compose-spec/compose-spec/06-networks.md @@ -63,7 +63,7 @@ The advanced example shows a Compose file which defines two custom networks. The driver is not available on the platform. ```yml -volumes: +networks: db-data: driver: overlay ``` diff --git a/_vendor/github.com/compose-spec/compose-spec/07-volumes.md b/_vendor/github.com/compose-spec/compose-spec/07-volumes.md index e4de39fc91..b4e3cfd919 100644 --- a/_vendor/github.com/compose-spec/compose-spec/07-volumes.md +++ b/_vendor/github.com/compose-spec/compose-spec/07-volumes.md @@ -113,7 +113,7 @@ characters. The name is used as is and is not scoped with the stack name. ```yml volumes: - data: + db-data: name: "my-app-data" ``` diff --git a/_vendor/github.com/compose-spec/compose-spec/08-configs.md b/_vendor/github.com/compose-spec/compose-spec/08-configs.md index 8a6e501322..627a4b0e99 100644 --- a/_vendor/github.com/compose-spec/compose-spec/08-configs.md +++ b/_vendor/github.com/compose-spec/compose-spec/08-configs.md @@ -55,6 +55,3 @@ configs: ``` If `external` is set to `true`, all other attributes apart from `name` are irrelevant. If Compose detecs any other attribute, it rejects the Compose file as invalid. - -Your Compose file needs to explicitly grant access to the configs to relevant services in your application. - diff --git a/_vendor/github.com/compose-spec/compose-spec/13-merge.md b/_vendor/github.com/compose-spec/compose-spec/13-merge.md index 0c94d1c08e..8cdfe32aba 100644 --- a/_vendor/github.com/compose-spec/compose-spec/13-merge.md +++ b/_vendor/github.com/compose-spec/compose-spec/13-merge.md @@ -85,8 +85,7 @@ Results in a Compose application model equivalent to the YAML tree: ```yaml services: foo: - DNS: - command: ["echo", "bar"] + command: ["echo", "bar"] ``` ### Unique resources diff --git a/_vendor/github.com/compose-spec/compose-spec/build.md b/_vendor/github.com/compose-spec/compose-spec/build.md index d3b22b0200..be4806abf4 100644 --- a/_vendor/github.com/compose-spec/compose-spec/build.md +++ b/_vendor/github.com/compose-spec/compose-spec/build.md @@ -1,46 +1,38 @@ -# The Compose Specification - Build support -{:.no_toc} +# Compose Build Specification -*Note:* Build is an optional part of the Compose specification. +> **Note:** +> +> Build is an optional part of the Compose Specification -* ToC -{:toc} - -## Introduction - -The Compose specification is a platform-neutral way to define multi-container applications. A Compose implementation which focuses on running an application on a local machine will obviously need to also support (re)building -application from source. The Compose Build specification lets developers define the build process within a Compose file +A Compose implementation which focuses on running an application on a local machine needs to also support (re)building the application from source. The Compose Build Specification lets you define the build process within a Compose file in a portable way. ## Definitions -Compose Specification can be extended to support an optional `build` subsection on services. - -This section defines the build requirements for a service container image. Only a subset of Compose file services can be defined in such a `build` -subsection, others may make use of the `image` attribute. When a `build` subsection is present for a service, it -is valid for Compose to miss out the `image` attribute for the corresponding service, as Compose +Only a subset of Compose file services can be defined under a `build` +subsection, others may make use of the `image` attribute. When a `build` subsection is present for a service, Compose ignores the `image` attribute for the corresponding service, as Compose can build an image from source. `build` can be either specified as a single string defining a context path, or as a detailed build definition. In the former case, the whole path is used as a Docker context to execute a Docker build, looking for a canonical -`Dockerfile` at the root of the directory. The path can be absolute or relative. If it is relative, it must be resolved -from the Compose file parent folder. If it is absolute, the path prevents the Compose file from being portable so Compose should warn the users accordingly. +`Dockerfile` at the root of the directory. The path can be absolute or relative. If it is relative, it is resolved +from the Compose file's parent folder. If it is absolute, the path prevents the Compose file from being portable so Compose displays a warning. -In the later case, build arguments can be specified, including an alternate `Dockerfile` location. The path can be absolute or relative. If it is relative, it must be resolved -from the Compose file parent folder. If it is absolute, the path prevents the Compose file from being portable so Compose should warn the users accordingly. +In the later case, build arguments can be specified, including an alternate `Dockerfile` location. The path can be absolute or relative. If it is relative, it is resolved +from the Compose file's parent folder. If it is absolute, the path prevents the Compose file from being portable so Compose displays a warning.. ## Consistency with `image` When a service definition includes both the `image` attribute and a `build` section, Compose can't guarantee a pulled image is strictly equivalent to building the same image from source. Without any explicit -user directives, Compose with Build support must first try to pull the image, then build from source -if the image was not found on registry. Compose may offer options to customize this behaviour by user +user directives, Compose with `build` support first tries to pull the image, then builds from source +if the image is not found on registry. Compose may offer options to customize this behaviour by user request. ## Publishing built images -Compose with Build support should offer an option to push built images to a registry. When doing so, it must not try to push service images without an `image` attribute. Compose should warn users about the missing `image` attribute which prevents images being pushed. +Compose with `build` support offers an option to push built images to a registry. When doing so, it doesn't try to push service images without an `image` attribute. Compose warns you about the missing `image` attribute which prevents images being pushed. A Compose implementation may offer a mechanism to compute an `image` attribute for services when not explicitly declared in a yaml file. In such cases, the resulting Compose configuration is considered to have a valid `image` @@ -48,7 +40,7 @@ attribute, whenever the actual raw yaml file doesn't explicitly declare one. ## Illustrative example -The following example illustrates Compose specification concepts with a concrete sample application. The sample is non-normative. +The following example illustrates Compose Build Specification concepts with a concrete sample application. The sample is non-normative. ```yaml services: @@ -68,15 +60,15 @@ services: When used to build service images from source, the Compose file creates three Docker images: -* `awesome/webapp` Docker image is built using `webapp` sub-directory, within the Compose file's parent folder, as the Docker build context. Lack of a `Dockerfile` within this folder throws an error. -* `awesome/database` Docker image is built using `backend` sub-directory within the Compose file parent folder. `backend.Dockerfile` file is used to define build steps, this file is searched relative to the context path, which means `..` resolves to the Compose file parent folder, so `backend.Dockerfile` is a sibling file. -* A Docker image is built using the `custom` directory with the user's HOME as the Docker context. Compose warns the user about the non-portable path used to build image. +* `awesome/webapp`: A Docker image is built using `webapp` sub-directory, within the Compose file's parent folder, as the Docker build context. Lack of a `Dockerfile` within this folder throws an error. +* `awesome/database`: A Docker image is built using `backend` sub-directory within the Compose file parent folder. `backend.Dockerfile` file is used to define build steps, this file is searched relative to the context path, which means `..` resolves to the Compose file parent folder, so `backend.Dockerfile` is a sibling file. +* A Docker image is built using the `custom` directory with the user's HOME as the Docker context. Compose displays a warning about the non-portable path used to build image. -On push, both `awesome/webapp` and `awesome/database` Docker images are pushed to the default registry. The `custom` service image is skipped as no `image` attribute is set and the user is warned about this missing attribute. +On push, both `awesome/webapp` and `awesome/database` Docker images are pushed to the default registry. The `custom` service image is skipped as no `image` attribute is set and Compose displays a warning about this missing attribute. -## Build definition +## Attributes -The `build` element defines configuration options that are applied by Compose to build Docker image from source. +The `build` subsection defines configuration options that are applied by Compose to build Docker images from source. `build` can be specified either as a string containing a path to the build context or as a detailed structure: Using the string syntax, only the build context can be configured as either: @@ -104,8 +96,8 @@ Alternatively `build` can be an object with fields defined as follows: `context` defines either a path to a directory containing a Dockerfile, or a URL to a git repository. -When the value supplied is a relative path, it must be interpreted as relative to the location of the Compose file. -Compose warns users about the absolute path used to define the build context as those prevent the Compose file +When the value supplied is a relative path, it is interpreted as relative to the location of the Compose file. +Compose warns you about the absolute path used to define the build context as those prevent the Compose file from being portable. ```yml @@ -123,11 +115,11 @@ If not set explicitly, `context` defaults to project directory (`.`). ### dockerfile -`dockerfile` sets an alternate Dockerfile. A relative path must be resolved from the build context. -Compose warns users about the absolute path used to define the Dockerfile as it prevents Compose files +`dockerfile` sets an alternate Dockerfile. A relative path is resolved from the build context. +Compose warns you about the absolute path used to define the Dockerfile as it prevents Compose files from being portable. -When set, `dockerfile_inline` attribute is not allowed and a Compose +When set, `dockerfile_inline` attribute is not allowed and Compose rejects any Compose file having both set. ```yml @@ -138,10 +130,10 @@ build: ### dockerfile_inline -`dockerfile_inline` defines Dockerfile content as inlined string in a Compose file. When set, the `dockerfile` -attribute is not allowed and Compose should reject any Compose file having both set. +`dockerfile_inline` defines the Dockerfile content as an inlined string in a Compose file. When set, the `dockerfile` +attribute is not allowed and Compose rejects any Compose file having both set. -Use of YAML multi-line string syntax is recommended to define Dockerfile content: +Use of YAML multi-line string syntax is recommended to define the Dockerfile content: ```yml build: @@ -192,10 +184,9 @@ args: `ssh` defines SSH authentications that the image builder should use during image build (e.g., cloning private repository). `ssh` property syntax can be either: -* `default` - let the builder connect to the ssh-agent. -* `ID=path` - a key/value definition of an ID and the associated path. Can be either a [PEM](https://en.wikipedia.org/wiki/Privacy-Enhanced_Mail) file, or path to ssh-agent socket. +* `default`: Let the builder connect to the ssh-agent. +* `ID=path`: A key/value definition of an ID and the associated path. It can be either a [PEM](https://en.wikipedia.org/wiki/Privacy-Enhanced_Mail) file, or path to ssh-agent socket. -Simple `default` sample ```yaml build: context: . @@ -225,9 +216,9 @@ For illustration, [BuildKit extended syntax](https://github.com/compose-spec/com `cache_from` defines a list of sources the image builder should use for cache resolution. -Cache location syntax must follow the global format `[NAME|type=TYPE[,KEY=VALUE]]`. Simple `NAME` is actually a shortcut notation for `type=registry,ref=NAME`. +Cache location syntax follows the global format `[NAME|type=TYPE[,KEY=VALUE]]`. Simple `NAME` is actually a shortcut notation for `type=registry,ref=NAME`. -Compose Builder implementations may support custom types, the Compose specification defines canonical types which must be supported: +Compose Build implementations may support custom types, the Compose Specification defines canonical types which must be supported: - `registry` to retrieve build cache from an OCI image set by key `ref` @@ -241,7 +232,7 @@ build: - type=gha ``` -Unsupported caches must be ignored and not prevent users from building image. +Unsupported caches are ignored and don't prevent you from building images. ### cache_to @@ -257,7 +248,7 @@ build: Cache target is defined using the same `type=TYPE[,KEY=VALUE]` syntax defined by [`cache_from`](#cache_from). -Unsupported cache target must be ignored and not prevent users from building image. +Unsupported caches are ignored and don't prevent you from building images. ### additional_contexts @@ -283,12 +274,12 @@ build: source: https://github.com/myuser/project.git ``` -When used as a list, the syntax should follow the `NAME=VALUE` format, where `VALUE` is a string. Validation beyond that +When used as a list, the syntax follows the `NAME=VALUE` format, where `VALUE` is a string. Validation beyond that is the responsibility of the image builder (and is builder specific). Compose supports at least absolute and relative paths to a directory AND Git repository URLs, like [context](#context) does. Other context flavours must be prefixed to avoid ambiguity with a `type://` prefix. -Compose should warn the user if the image builder does not support additional contexts and may list +Compose warns you if the image builder does not support additional contexts and may list the unused contexts. Illustrative examples of how this is used in Buildx can be found @@ -315,11 +306,11 @@ configuration, which means for Linux `/etc/hosts` will get extra lines: ### isolation `isolation` specifies a build’s container isolation technology. Like [isolation](05-services.md#isolation), supported values -are platform-specific. +are platform specific. ### privileged -`privileged` configures the service image to build with elevated privileges. Support and actual impacts are platform-specific. +`privileged` configures the service image to build with elevated privileges. Support and actual impacts are platform specific. ```yml build: @@ -331,7 +322,7 @@ build: `labels` add metadata to the resulting image. `labels` can be set either as an array or a map. -reverse-DNS notation should be used to prevent labels from conflicting with those used by other software. +It's recommended that you use reverse-DNS notation to prevent your labels from conflicting with other software. ```yml build: @@ -489,30 +480,24 @@ When the `platforms` attribute is defined, Compose includes the service's platform, otherwise users won't be able to run images they built. Composes reports an error in the following cases: -* when the list contains multiple platforms but the implementation is incapable of storing multi-platform images -* when the list contains an unsupported platform +* When the list contains multiple platforms but the implementation is incapable of storing multi-platform images. +* When the list contains an unsupported platform. -```yml -build: - context: "." - platforms: - - "linux/amd64" - - "unsupported/unsupported" -``` -* when the list is non-empty and does not contain the service's platform - -```yml -services: - frontend: - platform: "linux/amd64" - build: - context: "." - platforms: - - "linux/arm64" -``` - -## Implementations - -* [docker-compose](https://docs.docker.com/compose) -* [buildX bake](https://docs.docker.com/buildx/working-with-buildx/) + ```yml + build: + context: "." + platforms: + - "linux/amd64" + - "unsupported/unsupported" + ``` +* When the list is non-empty and does not contain the service's platform + ```yml + services: + frontend: + platform: "linux/amd64" + build: + context: "." + platforms: + - "linux/arm64" + ``` diff --git a/_vendor/github.com/compose-spec/compose-spec/deploy.md b/_vendor/github.com/compose-spec/compose-spec/deploy.md index 7f303c1a57..3126eab764 100644 --- a/_vendor/github.com/compose-spec/compose-spec/deploy.md +++ b/_vendor/github.com/compose-spec/compose-spec/deploy.md @@ -1,29 +1,18 @@ -# The Compose Specification - Deployment support -{:.no_toc} +# Compose Deploy Specification -*Note:* Deployment is an optional part of the Compose Specification +> **Note:** +> +> Deploy is an optional part of the Compose Specification -* ToC -{:toc} +The Compose Deploy Specification lets you declare additional metadata on services so Compose gets +relevant data to allocate adequate resources on the platform and configure them to match your needs. -## Introduction - -Compose specification is a platform-neutral way to define multi-container applications. A Compose implementation supporting -deployment of an application model may require some additional metadata as the Compose application model is an abstract way -to reflect actual infrastructure needs per service, or lifecycle constraints. - -Compose Specification Deployment allows users to declare additional metadata on services so Composes gets -relevant data to allocate adequate resources on the platform and configure them to match user's needs. - -## Definitions - -The Compose specification is extended to support an optional `deploy` subsection on services. This section defines runtime requirements -for a service. +## Attributes ### endpoint_mode `endpoint_mode` specifies a service discovery method for external clients connecting to a service. Default and available values -are platform specific but the Compose specification defines two canonical values: +are platform specific but the Compose Deploy Specification defines two canonical values: * `endpoint_mode: vip`: Assigns the service a virtual IP (VIP) that acts as the front end for clients to reach the service on a network. Platform routes requests between the client and nodes running the service, without client knowledge of how @@ -46,7 +35,7 @@ services: ### labels -`labels` specifies metadata for the service. These labels must only be set on the service and not on any containers for the service. +`labels` specifies metadata for the service. These labels are only set on the service and not on any containers for the service. This assumes the platform has some native concept of "service" that can match the Compose application model. ```yml @@ -60,7 +49,7 @@ services: ### mode -`mode` defines the replication model used to run the service on the platform. Either `global` (exactly one container per physical node) or `replicated` (a specified number of containers). The default is `replicated`. +`mode` defines the replication model used to run the service on the platform. Either `global`, exactly one container per physical node, or `replicated`, a specified number of containers. The default is `replicated`. ```yml services: @@ -76,7 +65,7 @@ services: #### constraints -`constraints` defines a required property the platform's node must fulfill to run service container. Can be set either +`constraints` defines a required property the platform's node must fulfill to run the service container. It can be set either by a list or a map with string values. ```yml @@ -95,7 +84,7 @@ deploy: #### preferences -`preferences` defines a property the platform's node should fulfill to run service container. Can be set either +`preferences` defines a property the platform's node should fulfill to run service container. It can be set either by a list or a map with string values. ```yml @@ -131,8 +120,8 @@ services: `resources` configures physical resource constraints for container to run on platform. Those constraints can be configured as: -- `limits`: The platform must prevent container to allocate more -- `reservations`: The platform must guarantee container can allocate at least the configured amount +- `limits`: The platform must prevent the container to allocate more. +- `reservations`: The platform must guarantee the container can allocate at least the configured amount. ```yml services: @@ -151,7 +140,7 @@ services: #### cpus -`cpus` configures a limit or reservation for how much of the available CPU resources (as number of cores) a container can use. +`cpus` configures a limit or reservation for how much of the available CPU resources, as number of cores, a container can use. #### memory @@ -246,7 +235,7 @@ deploy: ### restart_policy -`restart_policy` configures if and how to restart containers when they exit. If `restart_policy` is not set, Compose considers the `restart` field set by service configuration. +`restart_policy` configures if and how to restart containers when they exit. If `restart_policy` is not set, Compose considers the `restart` field set by the service configuration. - `condition`: One of `none`, `on-failure` or `any` (default: `any`). - `delay`: How long to wait between restart attempts, specified as a [duration](11-extension.md#specifying-durations) (default: 0). diff --git a/_vendor/github.com/moby/buildkit/docs/buildkitd.toml.md b/_vendor/github.com/moby/buildkit/docs/buildkitd.toml.md index 60d1d902c4..e3551af756 100644 --- a/_vendor/github.com/moby/buildkit/docs/buildkitd.toml.md +++ b/_vendor/github.com/moby/buildkit/docs/buildkitd.toml.md @@ -18,6 +18,10 @@ root = "/var/lib/buildkit" # insecure-entitlements allows insecure entitlements, disabled by default. insecure-entitlements = [ "network.host", "security.insecure" ] +[log] + # log formatter: json or text + format = "text" + [grpc] address = [ "tcp://0.0.0.0:1234" ] # debugAddress is address for attaching go profiles and debuggers. @@ -29,6 +33,10 @@ insecure-entitlements = [ "network.host", "security.insecure" ] key = "/etc/buildkit/tls.key" ca = "/etc/buildkit/tlsca.crt" +[otel] + # OTEL collector trace socket path + socketPath = "/run/buildkit/otel-grpc.sock" + # config for build history API that stores information about completed build commands [history] # maxAge is the maximum age of history entries to keep, in seconds. @@ -64,7 +72,7 @@ insecure-entitlements = [ "network.host", "security.insecure" ] [[worker.oci.gcpolicy]] # keepBytes can be an integer number of bytes (e.g. 512000000), a string - # with a unit (e.g. "512MB"), or a string percentage of available disk + # with a unit (e.g. "512MB"), or a string percentage of the total disk # space (e.g. "10%") keepBytes = "512MB" # keepDuration can be an integer number of seconds (e.g. 172800), or a diff --git a/_vendor/github.com/moby/buildkit/frontend/dockerfile/docs/reference.md b/_vendor/github.com/moby/buildkit/frontend/dockerfile/docs/reference.md index 5a76d25d0a..8cb99da1a1 100644 --- a/_vendor/github.com/moby/buildkit/frontend/dockerfile/docs/reference.md +++ b/_vendor/github.com/moby/buildkit/frontend/dockerfile/docs/reference.md @@ -392,7 +392,9 @@ uses this mechanism: !README.md ``` -All markdown files *except* `README.md` are excluded from the context. +All markdown files right under the context directory *except* `README.md` +are excluded from the context. Note that markdown files under subdirectories +are still included. The placement of `!` exception rules influences the behavior: the last line of the `.dockerignore` that matches a particular file determines @@ -1295,10 +1297,6 @@ guide – Leverage build cache](https://docs.docker.com/develop/develop-images/d in its path. ### Verifying a remote file checksum `ADD --checksum= ` -> **Note** -> -> Not yet available in stable syntax, use [`docker/dockerfile:1-labs`](#syntax) version (`1.5-labs` or newer). -> Planned to be included in `docker/dockerfile:1.6`. The checksum of a remote file can be verified with the `--checksum` flag: @@ -1310,18 +1308,13 @@ The `--checksum` flag only supports HTTP sources currently. ### Adding a git repository `ADD ` -> **Note** -> -> Not yet available in stable syntax, use [`docker/dockerfile:1-labs`](#syntax) version (`1.5-labs` or newer). -> Planned to be included in `docker/dockerfile:1.6`. - This form allows adding a git repository to an image directly, without using the `git` command inside the image: ``` ADD [--keep-git-dir=] ``` ```dockerfile -# syntax=docker/dockerfile:1-labs +# syntax=docker/dockerfile:1 FROM alpine ADD --keep-git-dir=true https://github.com/moby/buildkit.git#v0.10.1 /buildkit ``` @@ -1333,7 +1326,7 @@ The `--keep-git-dir=true` flag adds the `.git` directory. This flag defaults to To add a private repo via SSH, create a Dockerfile with the following form: ```dockerfile -# syntax=docker/dockerfile:1-labs +# syntax=docker/dockerfile:1 FROM alpine ADD git@git.example.com:foo/bar.git /bar ``` diff --git a/_vendor/modules.txt b/_vendor/modules.txt index 4b767f62a2..83d786bf6b 100644 --- a/_vendor/modules.txt +++ b/_vendor/modules.txt @@ -1,8 +1,8 @@ # github.com/moby/moby v24.0.5+incompatible -# github.com/moby/buildkit v0.12.1 +# github.com/moby/buildkit v0.12.1-0.20230824004934-4376f3861b05 # github.com/docker/buildx v0.11.2 # github.com/docker/scout-cli v0.20.0 # github.com/docker/cli v24.0.5+incompatible # github.com/docker/compose-cli v1.0.35 # github.com/distribution/distribution v2.8.2+incompatible -# github.com/compose-spec/compose-spec v0.0.0-20230810081227-631f10f1aabc +# github.com/compose-spec/compose-spec v0.0.0-20230824062516-848a47ad5d0e diff --git a/go.mod b/go.mod index 04856dd30c..a0f083acc3 100644 --- a/go.mod +++ b/go.mod @@ -3,14 +3,14 @@ module github.com/docker/docs go 1.20 require ( - github.com/compose-spec/compose-spec v0.0.0-20230810081227-631f10f1aabc // indirect + github.com/compose-spec/compose-spec v0.0.0-20230824062516-848a47ad5d0e // indirect github.com/distribution/distribution v2.8.2+incompatible // indirect github.com/docker/buildx v0.11.2 // indirect github.com/docker/cli v24.0.5+incompatible // indirect github.com/docker/compose-cli v1.0.35 // indirect github.com/docker/distribution v2.8.2+incompatible // indirect github.com/docker/scout-cli v0.20.0 // indirect - github.com/moby/buildkit v0.12.1 // indirect + github.com/moby/buildkit v0.12.1-0.20230824004934-4376f3861b05 // indirect github.com/moby/moby v24.0.5+incompatible // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.1.0-rc4 // indirect diff --git a/go.sum b/go.sum index 1b1d29e5a3..7d7cf4c08f 100644 --- a/go.sum +++ b/go.sum @@ -28,6 +28,8 @@ github.com/compose-spec/compose-spec v0.0.0-20230724132559-6907af1d7a8b h1:VbdFs github.com/compose-spec/compose-spec v0.0.0-20230724132559-6907af1d7a8b/go.mod h1:SkxF2HOKkzpp+mNdvGONzi3g2shI/M94GkMgsE0JLuk= github.com/compose-spec/compose-spec v0.0.0-20230810081227-631f10f1aabc h1:E93Ppj6xhV/QYCNTg0oWAnsJxuy7v5X3vLH+6iSp7IY= github.com/compose-spec/compose-spec v0.0.0-20230810081227-631f10f1aabc/go.mod h1:SkxF2HOKkzpp+mNdvGONzi3g2shI/M94GkMgsE0JLuk= +github.com/compose-spec/compose-spec v0.0.0-20230824062516-848a47ad5d0e h1:qmkQEx3/l6a4ofsiU+b1gDRkANoy55uyc3EXp1n77/Y= +github.com/compose-spec/compose-spec v0.0.0-20230824062516-848a47ad5d0e/go.mod h1:SkxF2HOKkzpp+mNdvGONzi3g2shI/M94GkMgsE0JLuk= github.com/containerd/fuse-overlayfs-snapshotter v1.0.2/go.mod h1:nRZceC8a7dRm3Ao6cJAwuJWPFiBPaibHiFntRUnzhwU= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/distribution/distribution v2.8.2+incompatible h1:k9+4DKdOG+quPFZXT/mUsiQrGu9vYCp+dXpuPkuqhk8= @@ -65,6 +67,8 @@ github.com/docker/scout-cli v0.20.0 h1:+rj/uckRFs8vzQSxcWsVU4v1IiyWDcPvj8bMOxxYu github.com/docker/scout-cli v0.20.0/go.mod h1:Eo1RyCJsx3ldz/YTY5yGxu9g9mwTYbRUutxQUkow3Fc= github.com/docker/scout-cli v0.22.3 h1:STf1Oq0+PSVaWEwNZ9UleHTEZ0JUP1py6eQaRK0qivA= github.com/docker/scout-cli v0.22.3/go.mod h1:Eo1RyCJsx3ldz/YTY5yGxu9g9mwTYbRUutxQUkow3Fc= +github.com/docker/scout-cli v0.23.0 h1:oFCNiO+11WhcnsXj3MF6uqJD49oBPMdJ3Pdq9XfZa4I= +github.com/docker/scout-cli v0.23.0/go.mod h1:Eo1RyCJsx3ldz/YTY5yGxu9g9mwTYbRUutxQUkow3Fc= github.com/elazarl/goproxy v0.0.0-20191011121108-aa519ddbe484/go.mod h1:Ro8st/ElPeALwNFlcTpWmkr6IoMFfkjXAvTHpevnDsM= github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= @@ -93,8 +97,12 @@ github.com/moby/buildkit v0.12.0 h1:hgPDVSeondFLb28cBtRR5O0N4t8uWGJ4YNukT2aICIs= github.com/moby/buildkit v0.12.0/go.mod h1:+n9GmkxwBCjVz4u7wmiyh+oqvjIjQM+1zk3iJrWfdos= github.com/moby/buildkit v0.12.1-0.20230717122532-faa0cc7da353 h1:/ZIwqvOF3QKObJbjX96xVvAKtnWdw/AuEqysbbujaZA= github.com/moby/buildkit v0.12.1-0.20230717122532-faa0cc7da353/go.mod h1:+n9GmkxwBCjVz4u7wmiyh+oqvjIjQM+1zk3iJrWfdos= +github.com/moby/buildkit v0.12.1-0.20230824004934-4376f3861b05 h1:oXcA1w1cswNzFW5TH5QoaAJ2zskZlFNsL8IHo28G3Os= +github.com/moby/buildkit v0.12.1-0.20230824004934-4376f3861b05/go.mod h1:BIvNtlrvok2xTC734ZNhQVGayvMB1Dz8bFuArWTLnnM= github.com/moby/buildkit v0.12.1 h1:vvMG7EZYCiQZpTtXQkvyeyj7HzT1JHhDWj+/aiGIzLM= github.com/moby/buildkit v0.12.1/go.mod h1:adB4y0SxxX8trnrY+oEulb48ODLqPO6pKMF0ppGcCoI= +github.com/moby/buildkit v0.12.2 h1:B7guBgY6sfk4dBlv/ORUxyYlp0UojYaYyATgtNwSCXc= +github.com/moby/buildkit v0.12.2/go.mod h1:adB4y0SxxX8trnrY+oEulb48ODLqPO6pKMF0ppGcCoI= github.com/moby/locker v1.0.1/go.mod h1:S7SDdo5zpBK84bzzVlKr2V0hz+7x9hWbYC/kq7oQppc= github.com/moby/moby v24.0.2+incompatible h1:yH+5dRHH1x3XRKzl1THA2aGTy6CHYnkt5N924ADMax8= github.com/moby/moby v24.0.2+incompatible/go.mod h1:fDXVQ6+S340veQPv35CzDahGBmHsiclFwfEygB/TWMc=