Skip to content

Commit 3f62976

Browse files
authored
Merge pull request #4742 from crazy-max/v0.13_cherry-picks
[v0.13] cherry-picks
2 parents 2afc050 + f64b48e commit 3f62976

5 files changed

Lines changed: 21 additions & 16 deletions

File tree

.github/workflows/validate.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,17 @@ jobs:
3838
runs-on: ubuntu-22.04
3939
needs:
4040
- prepare
41-
env:
42-
GOLANGCI_LINT_MULTIPLATFORM: 1
4341
strategy:
4442
fail-fast: false
4543
matrix:
4644
target: ${{ fromJson(needs.prepare.outputs.targets) }}
4745
steps:
46+
-
47+
name: Prepare
48+
run: |
49+
if [ "$GITHUB_REPOSITORY" = "moby/buildkit" ]; then
50+
echo "GOLANGCI_LINT_MULTIPLATFORM=1" >> $GITHUB_ENV
51+
fi
4852
-
4953
name: Checkout
5054
uses: actions/checkout@v4

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ Keys supported by image output:
286286
* `name-canonical=true`: add additional canonical name `name@<digest>`
287287
* `compression=<uncompressed|gzip|estargz|zstd>`: choose compression type for layers newly created and cached, gzip is default value. estargz should be used with `oci-mediatypes=true`.
288288
* `compression-level=<value>`: compression level for gzip, estargz (0-9) and zstd (0-22)
289-
* `rewrite-timestamp=true` (Present in the `master` branch <!-- TODO: v0.13-->): rewrite the file timestamps to the `SOURCE_DATE_EPOCH` value.
289+
* `rewrite-timestamp=true`: rewrite the file timestamps to the `SOURCE_DATE_EPOCH` value.
290290
See [`docs/build-repro.md`](docs/build-repro.md) for how to specify the `SOURCE_DATE_EPOCH` value.
291291
* `force-compression=true`: forcefully apply `compression` option to all layers (including already existing layers)
292292
* `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).

docs/build-repro.md

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,7 @@ Minimal support is also available on older BuildKit when using Dockerfile 1.5 fr
4646
```console
4747
buildctl build --frontend dockerfile.v0 --opt build-arg:SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct) ...
4848
```
49-
50-
The `buildctl` CLI (<= 0.12) does not automatically propagate the `$SOURCE_DATE_EPOCH` environment value from the client host to the `SOURCE_DATE_EPOCH` build arg.
51-
<!-- TODO: s/master/v0.13/ -->
52-
In the `master` branch of BuildKit, the `buildctl` CLI is updated to automatically capture the environment value.
53-
Docker Buildx (>= 0.10) automatically captures the environment value too.
49+
The `buildctl` CLI (>= v0.13) and Docker Buildx (>= 0.10) automatically propagate the `$SOURCE_DATE_EPOCH` environment value from the client host to the `SOURCE_DATE_EPOCH` build arg.
5450

5551
The build arg value is used for:
5652
- the `created` timestamp in the [OCI Image Config](https://github.com/opencontainers/image-spec/blob/main/config.md#properties)
@@ -64,8 +60,7 @@ To apply the build arg value to the timestamps of the files inside the image, sp
6460
--output type=image,name=docker.io/username/image,push=true,rewrite-timestamp=true
6561
```
6662

67-
<!-- TODO: s/master/v0.13/ -->
68-
The `rewrite-timestamp` option is only available in the `master` branch of BuildKit.
63+
The `rewrite-timestamp` option is available since BuildKit v0.13.
6964
See [v0.12 documentation](https://github.com/moby/buildkit/blob/v0.12/docs/build-repro.md#caveats) for dealing with timestamps
7065
in BuildKit v0.12 and v0.11.
7166

docs/windows.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,14 @@ We will apprecate any feedback by [opening an issue here](https://github.com/mob
3131

3232
> **NOTE:** all these requires running as admin (elevated) on a PowerShell terminal.
3333
34+
Make sure that `Containers` feature is enabled. (_`Microsoft-Hyper-V` is a bonus but not necessarily needed for our current guide. Also it's depended on your virtualization platform setup._) Run:
35+
36+
```powershell
37+
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V, Containers -All
38+
```
39+
40+
You will be asked to restart your machine, do so, and then continue with the rest of the steps. No other restart needed.
41+
3442
1. Setup `containerd` by following [the setup instructions here](https://github.com/containerd/containerd/blob/main/docs/getting-started.md#installing-containerd-on-windows). (_Currently, we only support the `containerd` worker_.)
3543
1. Start the `containerd` service, if not yet started.
3644
1. Download and extract:

frontend/dockerfile/docs/reference.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1575,8 +1575,7 @@ conditions for cache reuse.
15751575

15761576
> **Note**
15771577
>
1578-
> Available in [`docker/dockerfile-upstream:master-labs`](#syntax).
1579-
> Will be included in `docker/dockerfile:1.7-labs`.
1578+
> Not yet available in stable syntax, use [`docker/dockerfile:1.7-labs`](#syntax) version.
15801579
15811580
```dockerfile
15821581
COPY [--parents[=<boolean>]] <src> ... <dest>
@@ -1585,7 +1584,7 @@ COPY [--parents[=<boolean>]] <src> ... <dest>
15851584
The `--parents` flag preserves parent directories for `src` entries. This flag defaults to `false`.
15861585

15871586
```dockerfile
1588-
# syntax=docker/dockerfile-upstream:master-labs
1587+
# syntax=docker/dockerfile:1.7-labs
15891588
FROM scratch
15901589

15911590
COPY ./x/a.txt ./y/a.txt /no_parents/
@@ -1605,7 +1604,7 @@ directories after it will be preserved. This may be especially useful copies bet
16051604
with `--from` where the source paths need to be absolute.
16061605

16071606
```dockerfile
1608-
# syntax=docker/dockerfile-upstream:master-labs
1607+
# syntax=docker/dockerfile:1.7-labs
16091608
FROM scratch
16101609

16111610
COPY --parents ./x/./y/*.txt /parents/
@@ -1634,8 +1633,7 @@ with the `--parents` flag, the Buildkit is capable of packing multiple
16341633

16351634
> **Note**
16361635
>
1637-
> Available in [`docker/dockerfile-upstream:master-labs`](#syntax).
1638-
> Will be included in `docker/dockerfile:1.7-labs`.
1636+
> Not yet available in stable syntax, use [`docker/dockerfile:1.7-labs`](#syntax) version.
16391637
16401638
```dockerfile
16411639
COPY [--exclude=<path> ...] <src> ... <dest>

0 commit comments

Comments
 (0)