mirror of https://github.com/docker/docs.git
vendor: github.com/moby/buildkit 1efcd30d9dd6
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
This commit is contained in:
parent
425db7cb39
commit
0953872dd0
|
@ -707,7 +707,7 @@ The command is run in the host's network environment (similar to
|
||||||
> which needs to be enabled when starting the buildkitd daemon with
|
> which needs to be enabled when starting the buildkitd daemon with
|
||||||
> `--allow-insecure-entitlement network.host` flag or in [buildkitd config](https://github.com/moby/buildkit/blob/master/docs/buildkitd.toml.md),
|
> `--allow-insecure-entitlement network.host` flag or in [buildkitd config](https://github.com/moby/buildkit/blob/master/docs/buildkitd.toml.md),
|
||||||
> and for a build request with [`--allow network.host` flag](https://docs.docker.com/engine/reference/commandline/buildx_build/#allow).
|
> and for a build request with [`--allow network.host` flag](https://docs.docker.com/engine/reference/commandline/buildx_build/#allow).
|
||||||
{:.warning}
|
{ .warning }
|
||||||
|
|
||||||
## RUN --security
|
## RUN --security
|
||||||
|
|
||||||
|
@ -727,7 +727,7 @@ This is equivalent to running `docker run --privileged`.
|
||||||
> enabled when starting the buildkitd daemon with
|
> enabled when starting the buildkitd daemon with
|
||||||
> `--allow-insecure-entitlement security.insecure` flag or in [buildkitd config](https://github.com/moby/buildkit/blob/master/docs/buildkitd.toml.md),
|
> `--allow-insecure-entitlement security.insecure` flag or in [buildkitd config](https://github.com/moby/buildkit/blob/master/docs/buildkitd.toml.md),
|
||||||
> and for a build request with [`--allow security.insecure` flag](https://docs.docker.com/engine/reference/commandline/buildx_build/#allow).
|
> and for a build request with [`--allow security.insecure` flag](https://docs.docker.com/engine/reference/commandline/buildx_build/#allow).
|
||||||
{:.warning}
|
{ .warning }
|
||||||
|
|
||||||
#### Example: check entitlements
|
#### Example: check entitlements
|
||||||
|
|
||||||
|
@ -1457,6 +1457,46 @@ path, using `--link` is always recommended. The performance of `--link` is
|
||||||
equivalent or better than the default behavior and, it creates much better
|
equivalent or better than the default behavior and, it creates much better
|
||||||
conditions for cache reuse.
|
conditions for cache reuse.
|
||||||
|
|
||||||
|
|
||||||
|
## COPY --parents
|
||||||
|
|
||||||
|
> **Note**
|
||||||
|
>
|
||||||
|
> Available in [`docker/dockerfile-upstream:master-labs`](#syntax).
|
||||||
|
> Will be included in `docker/dockerfile:1.6-labs`.
|
||||||
|
|
||||||
|
```dockerfile
|
||||||
|
COPY [--parents[=<boolean>]] <src>... <dest>
|
||||||
|
```
|
||||||
|
|
||||||
|
The `--parents` flag preserves parent directories for `src` entries. This flag defaults to `false`.
|
||||||
|
|
||||||
|
```dockerfile
|
||||||
|
# syntax=docker/dockerfile-upstream:master-labs
|
||||||
|
FROM scratch
|
||||||
|
|
||||||
|
COPY ./x/a.txt ./y/a.txt /no_parents/
|
||||||
|
COPY --parents ./x/a.txt ./y/a.txt /parents/
|
||||||
|
|
||||||
|
# /no_parents/a.txt
|
||||||
|
# /parents/x/a.txt
|
||||||
|
# /parents/y/a.txt
|
||||||
|
```
|
||||||
|
|
||||||
|
This behavior is analogous to the [Linux `cp` utility's](https://www.man7.org/linux/man-pages/man1/cp.1.html)
|
||||||
|
`--parents` flag.
|
||||||
|
|
||||||
|
Note that, without the `--parents` flag specified, any filename collision will
|
||||||
|
fail the Linux `cp` operation with an explicit error message
|
||||||
|
(`cp: will not overwrite just-created './x/a.txt' with './y/a.txt'`), where the
|
||||||
|
Buildkit will silently overwrite the target file at the destination.
|
||||||
|
|
||||||
|
While it is possible to preserve the directory structure for `COPY`
|
||||||
|
instructions consisting of only one `src` entry, usually it is more beneficial
|
||||||
|
to keep the layer count in the resulting image as low as possible. Therefore,
|
||||||
|
with the `--parents` flag, the Buildkit is capable of packing multiple
|
||||||
|
`COPY` instructions together, keeping the directory structure intact.
|
||||||
|
|
||||||
## ENTRYPOINT
|
## ENTRYPOINT
|
||||||
|
|
||||||
ENTRYPOINT has two forms:
|
ENTRYPOINT has two forms:
|
||||||
|
@ -1918,7 +1958,7 @@ ARG buildno
|
||||||
>
|
>
|
||||||
> Refer to the [`RUN --mount=type=secret`](#run---mounttypesecret) section to
|
> Refer to the [`RUN --mount=type=secret`](#run---mounttypesecret) section to
|
||||||
> learn about secure ways to use secrets when building images.
|
> learn about secure ways to use secrets when building images.
|
||||||
{:.warning}
|
{ .warning }
|
||||||
|
|
||||||
### Default values
|
### Default values
|
||||||
|
|
||||||
|
@ -2115,7 +2155,7 @@ RUN echo "I'm building for $TARGETPLATFORM"
|
||||||
| `BUILDKIT_CACHE_MOUNT_NS` | String | Set optional cache ID namespace. |
|
| `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_CONTEXT_KEEP_GIT_DIR` | Bool | Trigger git context to keep the `.git` directory. |
|
||||||
| `BUILDKIT_INLINE_CACHE`[^2] | Bool | Inline cache metadata to 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_MULTI_PLATFORM` | Bool | Opt into deterministic output regardless of multi-platform output or not. |
|
||||||
| `BUILDKIT_SANDBOX_HOSTNAME` | String | Set the hostname (default `buildkitsandbox`) |
|
| `BUILDKIT_SANDBOX_HOSTNAME` | String | Set the hostname (default `buildkitsandbox`) |
|
||||||
| `BUILDKIT_SYNTAX` | String | Set frontend image |
|
| `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 |
|
| `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 |
|
||||||
|
@ -2316,6 +2356,7 @@ However, if a health check succeeds during the start period, the container is co
|
||||||
started and all consecutive failures will be counted towards the maximum number of retries.
|
started and all consecutive failures will be counted towards the maximum number of retries.
|
||||||
|
|
||||||
**start interval** is the time between health checks during the start period.
|
**start interval** is the time between health checks during the start period.
|
||||||
|
This option requires Docker Engine version 25.0 or later.
|
||||||
|
|
||||||
There can only be one `HEALTHCHECK` instruction in a Dockerfile. If you list
|
There can only be one `HEALTHCHECK` instruction in a Dockerfile. If you list
|
||||||
more than one then only the last `HEALTHCHECK` will take effect.
|
more than one then only the last `HEALTHCHECK` will take effect.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# github.com/moby/moby v24.0.5+incompatible
|
# github.com/moby/moby v24.0.5+incompatible
|
||||||
# github.com/moby/buildkit v0.13.0-beta1.0.20231011101155-c444964c2e8f
|
# github.com/moby/buildkit v0.13.0-beta1.0.20231113205014-1efcd30d9dd6
|
||||||
# github.com/docker/buildx v0.11.2
|
# github.com/docker/buildx v0.11.2
|
||||||
# github.com/docker/scout-cli v1.0.9
|
# github.com/docker/scout-cli v1.0.9
|
||||||
# github.com/docker/cli v24.0.8-0.20231106123152-48ec4f339e2b+incompatible
|
# github.com/docker/cli v24.0.8-0.20231106123152-48ec4f339e2b+incompatible
|
||||||
|
|
2
go.mod
2
go.mod
|
@ -11,6 +11,6 @@ require (
|
||||||
github.com/docker/compose-cli v1.0.35 // indirect
|
github.com/docker/compose-cli v1.0.35 // indirect
|
||||||
github.com/docker/compose/v2 v2.23.0 // indirect
|
github.com/docker/compose/v2 v2.23.0 // indirect
|
||||||
github.com/docker/scout-cli v1.0.9 // indirect
|
github.com/docker/scout-cli v1.0.9 // indirect
|
||||||
github.com/moby/buildkit v0.13.0-beta1.0.20231011101155-c444964c2e8f // indirect
|
github.com/moby/buildkit v0.13.0-beta1.0.20231113205014-1efcd30d9dd6 // indirect
|
||||||
github.com/moby/moby v24.0.5+incompatible // indirect
|
github.com/moby/moby v24.0.5+incompatible // indirect
|
||||||
)
|
)
|
||||||
|
|
2
go.sum
2
go.sum
|
@ -133,6 +133,8 @@ github.com/moby/buildkit v0.13.0-beta1.0.20231011042751-9ef1ed946118 h1:pqpcLt3w
|
||||||
github.com/moby/buildkit v0.13.0-beta1.0.20231011042751-9ef1ed946118/go.mod h1:oSHnUZH7sNtAFLyeN1syf46SuzMThKsCQaioNEqJVUk=
|
github.com/moby/buildkit v0.13.0-beta1.0.20231011042751-9ef1ed946118/go.mod h1:oSHnUZH7sNtAFLyeN1syf46SuzMThKsCQaioNEqJVUk=
|
||||||
github.com/moby/buildkit v0.13.0-beta1.0.20231011101155-c444964c2e8f h1:CEiXZq08D7vLOnEDl7XY95zbupdWOJrRLb1VeZ+Hxq8=
|
github.com/moby/buildkit v0.13.0-beta1.0.20231011101155-c444964c2e8f h1:CEiXZq08D7vLOnEDl7XY95zbupdWOJrRLb1VeZ+Hxq8=
|
||||||
github.com/moby/buildkit v0.13.0-beta1.0.20231011101155-c444964c2e8f/go.mod h1:oSHnUZH7sNtAFLyeN1syf46SuzMThKsCQaioNEqJVUk=
|
github.com/moby/buildkit v0.13.0-beta1.0.20231011101155-c444964c2e8f/go.mod h1:oSHnUZH7sNtAFLyeN1syf46SuzMThKsCQaioNEqJVUk=
|
||||||
|
github.com/moby/buildkit v0.13.0-beta1.0.20231113205014-1efcd30d9dd6 h1:gfbjHMadWpzz9Jbbo4l73lrkNrP2YvNsKIIg8e5Ra4s=
|
||||||
|
github.com/moby/buildkit v0.13.0-beta1.0.20231113205014-1efcd30d9dd6/go.mod h1:VE6gCOYRW2hbxnxtt7udKkYMF73YdvkgIrGhkB0EiDA=
|
||||||
github.com/moby/locker v1.0.1/go.mod h1:S7SDdo5zpBK84bzzVlKr2V0hz+7x9hWbYC/kq7oQppc=
|
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 h1:yH+5dRHH1x3XRKzl1THA2aGTy6CHYnkt5N924ADMax8=
|
||||||
github.com/moby/moby v24.0.2+incompatible/go.mod h1:fDXVQ6+S340veQPv35CzDahGBmHsiclFwfEygB/TWMc=
|
github.com/moby/moby v24.0.2+incompatible/go.mod h1:fDXVQ6+S340veQPv35CzDahGBmHsiclFwfEygB/TWMc=
|
||||||
|
|
Loading…
Reference in New Issue