Skip to content

Commit 2a0dd4b

Browse files
authored
Merge pull request moby#3622 from tonistiigi/fix-repro-test
dockerfile: fix reproducible digest test for non-amd64
2 parents 5cabb21 + 3340e4b commit 2a0dd4b

File tree

2 files changed

+5
-11
lines changed

2 files changed

+5
-11
lines changed

frontend/dockerfile/dockerfile_test.go

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,10 @@ func TestIntegration(t *testing.T) {
230230

231231
integration.Run(t, reproTests, append(opts,
232232
// Only use the amd64 digest, regardless to the host platform
233-
integration.WithMirroredImages(integration.OfficialImages("debian:bullseye-20230109-slim@sha256:1acb06a0c31fb467eb8327ad361f1091ab265e0bf26d452dea45dcb0c0ea5e75")))...)
233+
integration.WithMirroredImages(map[string]string{
234+
"amd64/bullseye-20230109-slim": "docker.io/amd64/debian:bullseye-20230109-slim@sha256:1acb06a0c31fb467eb8327ad361f1091ab265e0bf26d452dea45dcb0c0ea5e75",
235+
}),
236+
)...)
234237
}
235238

236239
func testDefaultEnvWithArgs(t *testing.T, sb integration.Sandbox) {
@@ -6526,17 +6529,13 @@ func testReproSourceDateEpoch(t *testing.T, sb integration.Sandbox) {
65266529
if sb.Snapshotter() == "native" {
65276530
t.Skip("the digest is not reproducible with the \"native\" snapshotter because hardlinks are processed in a different way: https://github.com/moby/buildkit/pull/3456#discussion_r1062650263")
65286531
}
6529-
if runtime.GOARCH != "amd64" {
6530-
t.Skip("FIXME: the image cannot be pulled on non-amd64 (`docker.io/arm64v8/debian:bullseye-20230109-slim@...: not found`): https://github.com/moby/buildkit/pull/3456#discussion_r1068989918")
6531-
}
6532-
65336532
f := getFrontend(t, sb)
65346533

65356534
tm := time.Date(2023, time.January, 10, 12, 34, 56, 0, time.UTC)
65366535
t.Logf("SOURCE_DATE_EPOCH=%d", tm.Unix())
65376536

65386537
dockerfile := []byte(`# The base image cannot be busybox, due to https://github.com/moby/buildkit/issues/3455
6539-
FROM --platform=linux/amd64 debian:bullseye-20230109-slim@sha256:1acb06a0c31fb467eb8327ad361f1091ab265e0bf26d452dea45dcb0c0ea5e75
6538+
FROM amd64/debian:bullseye-20230109-slim
65406539
RUN touch /foo
65416540
RUN touch /foo.1
65426541
RUN touch -d '2010-01-01 12:34:56' /foo-2010

util/testutil/integration/pins.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,4 @@ var pins = map[string]map[string]string{
1212
"arm64v8": "sha256:af06af3514c44a964d3b905b498cf6493db8f1cde7c10e078213a89c87308ba0",
1313
"library": "sha256:8914eb54f968791faf6a8638949e480fef81e697984fba772b3976835194c6d4",
1414
},
15-
"debian:bullseye-20230109-slim": {
16-
"amd64": "sha256:1acb06a0c31fb467eb8327ad361f1091ab265e0bf26d452dea45dcb0c0ea5e75",
17-
"arm64v8": "sha256:7816383f71131e55256c17d42fd77bd80f3c1c98948ebf449fe56eb6580f4c4c",
18-
"library": "sha256:98d3b4b0cee264301eb1354e0b549323af2d0633e1c43375d0b25c01826b6790",
19-
},
2015
}

0 commit comments

Comments
 (0)