diff --git a/.golangci.yml b/.golangci.yml index 25cbffa8d794..2917d8c47aaf 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -67,3 +67,6 @@ issues: - linters: - revive text: "stutters" + - linters: + - staticcheck + text: "SA1019: .*Build information is deprecated: https://github.com/moby/buildkit/blob/master/docs/deprecated.md" diff --git a/README.md b/README.md index 25e2fb01eed3..c295a095819d 100644 --- a/README.md +++ b/README.md @@ -257,8 +257,8 @@ Keys supported by image output: * `compression=`: choose compression type for layers newly created and cached, gzip is default value. estargz should be used with `oci-mediatypes=true`. * `compression-level=`: compression level for gzip, estargz (0-9) and zstd (0-22) * `force-compression=true`: forcefully apply `compression` option to all layers (including already existing layers) -* `buildinfo=true`: attach inline build info in [image config](docs/build-repro.md#image-config) (default `true`) -* `buildinfo-attrs=true`: attach inline build info attributes in [image config](docs/build-repro.md#image-config) (default `false`) +* `buildinfo=true`: attach inline build info in [image config](docs/buildinfo.md#image-config) (default `true`) +* `buildinfo-attrs=true`: attach inline build info attributes in [image config](docs/buildinfo.md#image-config) (default `false`) * `store=true`: store the result images to the worker's (e.g. containerd) image store as well as ensures that the image has all blobs in the content store (default `true`). Ignored if the worker doesn't have image store (e.g. OCI worker). * `annotation.=`: attach an annotation with the respective `key` and `value` to the built image * Using the extended syntaxes, `annotation-.=`, `annotation[].=` and both combined with `annotation-[].=`, allows configuring exactly where to attach the annotation. @@ -269,6 +269,12 @@ Keys supported by image output: If credentials are required, `buildctl` will attempt to read Docker configuration file `$DOCKER_CONFIG/config.json`. `$DOCKER_CONFIG` defaults to `~/.docker`. +> **Warning** +> +> Build information along `buildinfo` and `buildinfo-attrs` attributes are +> deprecated and will be removed in the next release. See the [Deprecated features page](./docs/deprecated.md) +> for status and alternative recommendation about this feature. + #### Local directory The local client will copy the files directly to the client. This is useful if BuildKit is being used for building something else than container images. @@ -575,26 +581,6 @@ jq '.' metadata.json ``` ```json { - "containerimage.buildinfo": { - "frontend": "dockerfile.v0", - "attrs": { - "context": "https://github.com/crazy-max/buildkit-buildsources-test.git#master", - "filename": "Dockerfile", - "source": "docker/dockerfile:master" - }, - "sources": [ - { - "type": "docker-image", - "ref": "docker.io/docker/buildx-bin:0.6.1@sha256:a652ced4a4141977c7daaed0a074dcd9844a78d7d2615465b12f433ae6dd29f0", - "pin": "sha256:a652ced4a4141977c7daaed0a074dcd9844a78d7d2615465b12f433ae6dd29f0" - }, - { - "type": "docker-image", - "ref": "docker.io/library/alpine:3.13", - "pin": "sha256:026f721af4cf2843e07bba648e158fb35ecc876d822130633cc49f707f0fc88c" - } - ] - }, "containerimage.config.digest": "sha256:2937f66a9722f7f4a2df583de2f8cb97fc9196059a410e7f00072fc918930e66", "containerimage.descriptor": { "annotations": { diff --git a/control/control.go b/control/control.go index 8446f4bedc76..2bd06db2576b 100644 --- a/control/control.go +++ b/control/control.go @@ -337,6 +337,15 @@ func (c *Controller) Solve(ctx context.Context, req *controlapi.SolveRequest) (* } } + if v, ok := req.FrontendAttrs["build-arg:BUILDKIT_BUILDINFO"]; ok && v != "" { + if _, ok := req.ExporterAttrs["buildinfo"]; !ok { + if req.ExporterAttrs == nil { + req.ExporterAttrs = make(map[string]string) + } + req.ExporterAttrs["buildinfo"] = v + } + } + if req.Exporter != "" { exp, err := w.Exporter(req.Exporter, c.opt.SessionManager) if err != nil { diff --git a/docs/build-repro.md b/docs/build-repro.md index fbf99ff9ed71..9b83ec0593ec 100644 --- a/docs/build-repro.md +++ b/docs/build-repro.md @@ -1,134 +1,6 @@ # Build reproducibility -## Build dependencies - -Build dependencies are generated when your image has been built. These -dependencies include versions of used images, git repositories and HTTP URLs -used by LLB `Source` operation as well as build request attributes. - -The structure is base64 encoded and has the following format when decoded: - -```json -{ - "frontend": "dockerfile.v0", - "attrs": { - "build-arg:foo": "bar", - "context": "https://github.com/crazy-max/buildkit-buildsources-test.git#master", - "filename": "Dockerfile", - "platform": "linux/amd64,linux/arm64", - "source": "crazymax/dockerfile:master" - }, - "sources": [ - { - "type": "docker-image", - "ref": "docker.io/docker/buildx-bin:0.6.1@sha256:a652ced4a4141977c7daaed0a074dcd9844a78d7d2615465b12f433ae6dd29f0", - "pin": "sha256:a652ced4a4141977c7daaed0a074dcd9844a78d7d2615465b12f433ae6dd29f0" - }, - { - "type": "docker-image", - "ref": "docker.io/library/alpine:3.13", - "pin": "sha256:1d30d1ba3cb90962067e9b29491fbd56997979d54376f23f01448b5c5cd8b462" - }, - { - "type": "git", - "ref": "https://github.com/crazy-max/buildkit-buildsources-test.git#master", - "pin": "259a5aa5aa5bb3562d12cc631fe399f4788642c1" - }, - { - "type": "http", - "ref": "https://raw.githubusercontent.com/moby/moby/v20.10.21/README.md", - "pin": "sha256:419455202b0ef97e480d7f8199b26a721a417818bc0e2d106975f74323f25e6c" - } - ] -} -``` - -* `frontend` defines the frontend used to build. -* `attrs` defines build request attributes. -* `sources` defines build sources. - * `type` defines the source type (`docker-image`, `git` or `http`). - * `ref` is the reference of the source. - * `pin` is the source digest. -* `deps` defines build dependencies of input contexts. - -### Image config - -A new field similar to the one for inline cache has been added to the image -configuration to embed build dependencies: - -```json -{ - "moby.buildkit.buildinfo.v0": "" -} -``` - -By default, the build dependencies are inlined in the image configuration. You -can disable this behavior with the [`buildinfo` attribute](../README.md#imageregistry). - -### Exporter response (metadata) - -The solver response (`ExporterResponse`) also contains a new key -`containerimage.buildinfo` with the same structure as image config encoded in -base64: - -```json -{ - "ExporterResponse": { - "containerimage.buildinfo": "", - "containerimage.digest": "sha256:..." - } -} -``` - -If multi-platforms are specified, they will be suffixed with the corresponding -platform: - -```json -{ - "ExporterResponse": { - "containerimage.buildinfo/linux/amd64": "", - "containerimage.buildinfo/linux/arm64": "", - "containerimage.digest": "sha256:..." - } -} -``` - -### Metadata JSON output - -If you're using the `--metadata-file` flag with [`buildctl`](../README.md#metadata), -[`buildx build`](https://github.com/docker/buildx/blob/master/docs/reference/buildx_build.md) -or [`buildx bake`](https://github.com/docker/buildx/blob/master/docs/reference/buildx_bake.md): - -```shell -jq '.' metadata.json -``` -```json -{ - "containerimage.buildinfo": { - "frontend": "dockerfile.v0", - "attrs": { - "context": "https://github.com/crazy-max/buildkit-buildsources-test.git#master", - "filename": "Dockerfile", - "source": "docker/dockerfile:master" - }, - "sources": [ - { - "type": "docker-image", - "ref": "docker.io/docker/buildx-bin:0.6.1@sha256:a652ced4a4141977c7daaed0a074dcd9844a78d7d2615465b12f433ae6dd29f0", - "pin": "sha256:a652ced4a4141977c7daaed0a074dcd9844a78d7d2615465b12f433ae6dd29f0" - }, - { - "type": "docker-image", - "ref": "docker.io/library/alpine:3.13", - "pin": "sha256:026f721af4cf2843e07bba648e158fb35ecc876d822130633cc49f707f0fc88c" - } - ] - }, - "containerimage.digest": "sha256:..." -} -``` - -### Reproducing the pinned dependencies +## Reproducing the pinned dependencies Reproducing the pinned dependencies is supported since BuildKit v0.11. diff --git a/docs/buildinfo.md b/docs/buildinfo.md new file mode 100644 index 000000000000..8863a5ea2d08 --- /dev/null +++ b/docs/buildinfo.md @@ -0,0 +1,141 @@ +# Build information + +> **Warning** +> +> Build information is deprecated and will be removed in the next release. See +> the [Deprecated features page](https://github.com/moby/buildkit/blob/master/docs/deprecated.md) +> for status and alternative recommendation about this feature. + +Build information structures are generated with build metadata that allows you +to see all the sources (images, git repositories) that were used by the build +with their exact versions and also the configuration that was passed to the +build. This information is also embedded into the image configuration if one +is generated. + +## Build dependencies + +Build dependencies are generated when your image has been built. These +dependencies include versions of used images, git repositories and HTTP URLs +used by LLB `Source` operation as well as build request attributes. + +The structure is base64 encoded and has the following format when decoded: + +```json +{ + "frontend": "dockerfile.v0", + "attrs": { + "build-arg:foo": "bar", + "context": "https://github.com/crazy-max/buildkit-buildsources-test.git#master", + "filename": "Dockerfile", + "platform": "linux/amd64,linux/arm64", + "source": "crazymax/dockerfile:master" + }, + "sources": [ + { + "type": "docker-image", + "ref": "docker.io/docker/buildx-bin:0.6.1@sha256:a652ced4a4141977c7daaed0a074dcd9844a78d7d2615465b12f433ae6dd29f0", + "pin": "sha256:a652ced4a4141977c7daaed0a074dcd9844a78d7d2615465b12f433ae6dd29f0" + }, + { + "type": "docker-image", + "ref": "docker.io/library/alpine:3.13", + "pin": "sha256:1d30d1ba3cb90962067e9b29491fbd56997979d54376f23f01448b5c5cd8b462" + }, + { + "type": "git", + "ref": "https://github.com/crazy-max/buildkit-buildsources-test.git#master", + "pin": "259a5aa5aa5bb3562d12cc631fe399f4788642c1" + }, + { + "type": "http", + "ref": "https://raw.githubusercontent.com/moby/moby/v20.10.21/README.md", + "pin": "sha256:419455202b0ef97e480d7f8199b26a721a417818bc0e2d106975f74323f25e6c" + } + ] +} +``` + +* `frontend` defines the frontend used to build. +* `attrs` defines build request attributes. +* `sources` defines build sources. + * `type` defines the source type (`docker-image`, `git` or `http`). + * `ref` is the reference of the source. + * `pin` is the source digest. +* `deps` defines build dependencies of input contexts. + +### Image config + +A new field similar to the one for inline cache has been added to the image +configuration to embed build dependencies: + +```json +{ + "moby.buildkit.buildinfo.v0": "" +} +``` + +By default, the build dependencies are inlined in the image configuration. You +can disable this behavior with the [`buildinfo` attribute](../README.md#imageregistry). + +### Exporter response (metadata) + +The solver response (`ExporterResponse`) also contains a new key +`containerimage.buildinfo` with the same structure as image config encoded in +base64: + +```json +{ + "ExporterResponse": { + "containerimage.buildinfo": "", + "containerimage.digest": "sha256:..." + } +} +``` + +If multi-platforms are specified, they will be suffixed with the corresponding +platform: + +```json +{ + "ExporterResponse": { + "containerimage.buildinfo/linux/amd64": "", + "containerimage.buildinfo/linux/arm64": "", + "containerimage.digest": "sha256:..." + } +} +``` + +### Metadata JSON output + +If you're using the `--metadata-file` flag with [`buildctl`](../README.md#metadata), +[`buildx build`](https://github.com/docker/buildx/blob/master/docs/reference/buildx_build.md) +or [`buildx bake`](https://github.com/docker/buildx/blob/master/docs/reference/buildx_bake.md): + +```shell +jq '.' metadata.json +``` +```json +{ + "containerimage.buildinfo": { + "frontend": "dockerfile.v0", + "attrs": { + "context": "https://github.com/crazy-max/buildkit-buildsources-test.git#master", + "filename": "Dockerfile", + "source": "docker/dockerfile:master" + }, + "sources": [ + { + "type": "docker-image", + "ref": "docker.io/docker/buildx-bin:0.6.1@sha256:a652ced4a4141977c7daaed0a074dcd9844a78d7d2615465b12f433ae6dd29f0", + "pin": "sha256:a652ced4a4141977c7daaed0a074dcd9844a78d7d2615465b12f433ae6dd29f0" + }, + { + "type": "docker-image", + "ref": "docker.io/library/alpine:3.13", + "pin": "sha256:026f721af4cf2843e07bba648e158fb35ecc876d822130633cc49f707f0fc88c" + } + ] + }, + "containerimage.digest": "sha256:..." +} +``` diff --git a/docs/deprecated.md b/docs/deprecated.md new file mode 100644 index 000000000000..c6c75f0b8ae6 --- /dev/null +++ b/docs/deprecated.md @@ -0,0 +1,49 @@ +# Deprecated features + +This page provides an overview of features that are deprecated in BuildKit. + +As changes are made to BuildKit there may be times when existing features need +to be removed or replaced with newer features. Before an existing feature is +removed it is labeled as "deprecated" within the documentation and remains in +BuildKit for at least one stable release unless specified explicitly otherwise. +After that time it may be removed. + +Users are expected to take note of the list of deprecated features each release +and plan their migration away from those features, and (if applicable) towards +the replacement features as soon as possible. + +The table below provides an overview of the current status of deprecated +features: + +- **Deprecated**: the feature is marked "deprecated" and should no longer be + used. The feature may be removed, disabled, or change behavior in a future + release. The _"Deprecated"_ column contains the release in which the feature + was marked deprecated, whereas the _"Remove"_ column contains a tentative + release in which the feature is to be removed. If no release is included in + the _"Remove"_ column, the release is yet to be decided on. +- **Removed**: the feature was removed, disabled, or hidden. Refer to the linked + section for details. Some features are "soft" deprecated, which means that + they remain functional for backward compatibility, and to allow users to + migrate to alternatives. In such cases, a warning may be printed, and users + should not rely on this feature. + +| Status | Feature | Deprecated | Remove | Recommendation | +|------------|-----------------------------------------|------------|--------|------------------------------------------------------------------| +| Deprecated | [Build information](#build-information) | v0.11 | v0.12 | Use [provenance attestations](./attestations/slsa-provenance.md) | + +## Build information + +[Build information](https://github.com/moby/buildkit/blob/v0.11/docs/buildinfo.md) +structures have been introduced in [BuildKit v0.10.0](https://github.com/moby/buildkit/releases/tag/v0.10.0) +and are generated with build metadata that allows you to see all the sources +(images, git repositories) that were used by the build with their exact +versions and also the configuration that was passed to the build. This +information is also embedded into the image configuration if one is generated. + +With the introduction of [provenance attestations](./attestations/slsa-provenance.md) +in [BuildKit v0.11.0](https://github.com/moby/buildkit/releases/tag/v0.11.0), +the build information feature has been deprecated and will be removed in the +next release. + +To completely disable the build information feature, set the build-arg +`BUILDKIT_BUILDINFO=false`. diff --git a/exporter/containerimage/exptypes/types.go b/exporter/containerimage/exptypes/types.go index f22344c86a7e..4531360afa80 100644 --- a/exporter/containerimage/exptypes/types.go +++ b/exporter/containerimage/exptypes/types.go @@ -11,7 +11,7 @@ const ( ExporterImageConfigDigestKey = "containerimage.config.digest" ExporterImageDescriptorKey = "containerimage.descriptor" ExporterInlineCache = "containerimage.inlinecache" - ExporterBuildInfo = "containerimage.buildinfo" + ExporterBuildInfo = "containerimage.buildinfo" // Deprecated: Build information is deprecated: https://github.com/moby/buildkit/blob/master/docs/deprecated.md ExporterPlatformsKey = "refs.platforms" ExporterEpochKey = "source.date.epoch" ) diff --git a/exporter/containerimage/opts.go b/exporter/containerimage/opts.go index c12d86127e0f..4948eaad2431 100644 --- a/exporter/containerimage/opts.go +++ b/exporter/containerimage/opts.go @@ -28,15 +28,16 @@ const ( ) type ImageCommitOpts struct { - ImageName string - RefCfg cacheconfig.RefConfig - OCITypes bool - BuildInfo bool - BuildInfoAttrs bool - Annotations AnnotationsGroup - Epoch *time.Time + ImageName string + RefCfg cacheconfig.RefConfig + OCITypes bool + Annotations AnnotationsGroup + Epoch *time.Time ForceInlineAttestations bool // force inline attestations to be attached + + BuildInfo bool // Deprecated: Build information is deprecated: https://github.com/moby/buildkit/blob/master/docs/deprecated.md + BuildInfoAttrs bool // Deprecated: Build information is deprecated: https://github.com/moby/buildkit/blob/master/docs/deprecated.md } func (c *ImageCommitOpts) Load(opt map[string]string) (map[string]string, error) { diff --git a/frontend/dockerfile/cmd/dockerfile-frontend/hack/release b/frontend/dockerfile/cmd/dockerfile-frontend/hack/release index 8d71f83e8def..7a7909c5fca3 100755 --- a/frontend/dockerfile/cmd/dockerfile-frontend/hack/release +++ b/frontend/dockerfile/cmd/dockerfile-frontend/hack/release @@ -93,7 +93,7 @@ case $TYP in buildxCmd build $platformFlag $cacheFromFlags $cacheToFlags $nocacheFilterFlag $(buildAttestFlags) \ --build-arg "CHANNEL=$TAG" \ --build-arg "BUILDTAGS=$buildTags" \ - --output "type=image,name=$REPO:$pushTag,buildinfo-attrs=true,$pushFlag" \ + --output "type=image,name=$REPO:$pushTag,$pushFlag" \ --file "./frontend/dockerfile/cmd/dockerfile-frontend/Dockerfile" \ $currentcontext ;; @@ -110,7 +110,7 @@ case $TYP in buildxCmd build $platformFlag $cacheFromFlags $cacheToFlags $nocacheFilterFlag $(buildAttestFlags) \ --build-arg "CHANNEL=$TAG" \ --build-arg "BUILDTAGS=$buildTags" \ - --output "type=image,\"name=$publishedNames\",buildinfo-attrs=true,$pushFlag" \ + --output "type=image,\"name=$publishedNames\",$pushFlag" \ --file "./frontend/dockerfile/cmd/dockerfile-frontend/Dockerfile" \ $currentcontext ;; @@ -150,7 +150,7 @@ case $TYP in buildxCmd build $platformFlag $cacheFromFlags $cacheToFlags $nocacheFilterFlag $(buildAttestFlags) \ --build-arg "CHANNEL=$TAG" \ --build-arg "BUILDTAGS=$buildTags" \ - --output "type=image,name=$REPO:$dt-$TAG,buildinfo-attrs=true,$pushFlag" \ + --output "type=image,name=$REPO:$dt-$TAG,$pushFlag" \ --file "./frontend/dockerfile/cmd/dockerfile-frontend/Dockerfile" \ $currentcontext rm $tmp/buildid diff --git a/frontend/dockerfile/docs/reference.md b/frontend/dockerfile/docs/reference.md index 0065a59eb062..a2603a05f56e 100644 --- a/frontend/dockerfile/docs/reference.md +++ b/frontend/dockerfile/docs/reference.md @@ -2213,16 +2213,23 @@ RUN echo "I'm building for $TARGETPLATFORM" ### BuildKit built-in build args -| Arg | Type | Description | -|---------------------------------------|--------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| `BUILDKIT_CACHE_MOUNT_NS` | String | Set optional cache ID namespace. | -| `BUILDKIT_CONTEXT_KEEP_GIT_DIR` | Bool | Trigger git context to keep the `.git` directory. | -| `BUILDKIT_INLINE_BUILDINFO_ATTRS`[^2] | Bool | Inline build info attributes in image config or not. | -| `BUILDKIT_INLINE_CACHE`[^2] | Bool | Inline cache metadata to image config or not. | -| `BUILDKIT_MULTI_PLATFORM` | Bool | Opt into determnistic output regardless of multi-platform output or not. | -| `BUILDKIT_SANDBOX_HOSTNAME` | String | Set the hostname (default `buildkitsandbox`) | -| `BUILDKIT_SYNTAX` | String | Set frontend image | -| `SOURCE_DATE_EPOCH` | Int | Set the UNIX timestamp for created image and layers. More info from [reproducible builds](https://reproducible-builds.org/docs/source-date-epoch/). Supported since Dockerfile 1.5, BuildKit 0.11 | +| Arg | Type | Description | +|---------------------------------------|--------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| `BUILDKIT_CACHE_MOUNT_NS` | String | Set optional cache ID namespace. | +| `BUILDKIT_CONTEXT_KEEP_GIT_DIR` | Bool | Trigger git context to keep the `.git` directory. | +| `BUILDKIT_BUILDINFO` | Bool | Enable build info (default `true`). | +| `BUILDKIT_INLINE_BUILDINFO_ATTRS`[^2] | Bool | Inline build info attributes in image config or not. | +| `BUILDKIT_INLINE_CACHE`[^2] | Bool | Inline cache metadata to image config or not. | +| `BUILDKIT_MULTI_PLATFORM` | Bool | Opt into determnistic output regardless of multi-platform output or not. | +| `BUILDKIT_SANDBOX_HOSTNAME` | String | Set the hostname (default `buildkitsandbox`) | +| `BUILDKIT_SYNTAX` | String | Set frontend image | +| `SOURCE_DATE_EPOCH` | Int | Set the UNIX timestamp for created image and layers. More info from [reproducible builds](https://reproducible-builds.org/docs/source-date-epoch/). Supported since Dockerfile 1.5, BuildKit 0.11 | + +> **Warning** +> +> Build information along `BUILDKIT_BUILDINFO` and `BUILDKIT_INLINE_BUILDINFO_ATTRS` +> build args are deprecated and will be removed in the next release. See the [BuildKit Deprecated features page](https://github.com/moby/buildkit/blob/master/docs/deprecated.md) +> for status and alternative recommendation about this feature. #### Example: keep `.git` dir diff --git a/hack/images b/hack/images index cbaf0eb16f2c..d1315e6a17ef 100755 --- a/hack/images +++ b/hack/images @@ -44,10 +44,10 @@ attestFlags="$(buildAttestFlags)" outputFlag="--output=type=image,push=false" if [ "$PUSH" = "push" ]; then - outputFlag="--output=type=image,buildinfo-attrs=true,push=true" + outputFlag="--output=type=image,push=true" fi if [ -n "$localmode" ]; then - outputFlag="--output=type=docker,buildinfo-attrs=true" + outputFlag="--output=type=docker" attestFlags="" fi diff --git a/solver/jobs.go b/solver/jobs.go index 465534d93433..27e15348615f 100644 --- a/solver/jobs.go +++ b/solver/jobs.go @@ -200,7 +200,6 @@ type subBuilder struct { } func (sb *subBuilder) Build(ctx context.Context, e Edge) (CachedResultWithProvenance, error) { - // TODO(@crazy-max): Handle BuildInfo from subbuild res, err := sb.solver.subBuild(ctx, e, sb.vtx) if err != nil { return nil, err diff --git a/util/buildinfo/buildinfo.go b/util/buildinfo/buildinfo.go index 64b9ea48e146..e3486e8e4f11 100644 --- a/util/buildinfo/buildinfo.go +++ b/util/buildinfo/buildinfo.go @@ -1,3 +1,6 @@ +// Package buildinfo implements utilities for build information. +// +// Deprecated: Build information is deprecated: https://github.com/moby/buildkit/blob/master/docs/deprecated.md package buildinfo import ( @@ -17,9 +20,6 @@ import ( "github.com/pkg/errors" ) -// BuildInfo format has been deprecated and will be removed in a future release. -// Use provenance attestations instead. - func FromProvenance(c *provenance.Capture) (*binfotypes.BuildInfo, error) { var bi binfotypes.BuildInfo @@ -418,6 +418,7 @@ func filterAttrs(key string, attrs map[string]*string) map[string]*string { var knownControlArgs = []string{ "BUILDKIT_CACHE_MOUNT_NS", "BUILDKIT_CONTEXT_KEEP_GIT_DIR", + "BUILDKIT_BUILDINFO", "BUILDKIT_INLINE_BUILDINFO_ATTRS", "BUILDKIT_INLINE_CACHE", "BUILDKIT_MULTI_PLATFORM", diff --git a/util/buildinfo/types/types.go b/util/buildinfo/types/types.go index 93abcd1b4f12..06cf09681e74 100644 --- a/util/buildinfo/types/types.go +++ b/util/buildinfo/types/types.go @@ -1,3 +1,6 @@ +// Package binfotypes implements types for build information. +// +// Deprecated: Build information is deprecated: https://github.com/moby/buildkit/blob/master/docs/deprecated.md package binfotypes import ( diff --git a/util/imageutil/buildinfo.go b/util/imageutil/buildinfo.go index 2ef1e75cfc0b..7196453c33c0 100644 --- a/util/imageutil/buildinfo.go +++ b/util/imageutil/buildinfo.go @@ -9,6 +9,8 @@ import ( ) // BuildInfo returns build info from image config. +// +// Deprecated: Build information is deprecated: https://github.com/moby/buildkit/blob/master/docs/deprecated.md func BuildInfo(dt []byte) (*binfotypes.BuildInfo, error) { if len(dt) == 0 { return nil, nil