Skip to content

Commit 8f16014

Browse files
committed
remove unused emulators from exported image
Signed-off-by: Tonis Tiigi <[email protected]>
1 parent a9720d0 commit 8f16014

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

Dockerfile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,10 +161,15 @@ COPY --link --from=cni-plugins /opt/cni/bin/firewall /buildkit-cni-firewall
161161
FROM scratch AS cni-plugins-export-squashed
162162
COPY --from=cni-plugins-export / /
163163

164+
FROM --platform=$BUILDPLATFORM alpine:${ALPINE_VERSION} AS binfmt-filter
165+
# built from https://github.com/tonistiigi/binfmt/releases/tag/buildkit%2Fv9.2.0-50
166+
COPY --link --from=tonistiigi/binfmt:buildkit-v9.2.0-50@sha256:ff21b00e7238dce3bbd74fbe25591f7213837a77861b47b2df5e019540ec33fa / /out/
167+
WORKDIR /out/
168+
RUN rm buildkit-qemu-loongarch64 buildkit-qemu-mips64 buildkit-qemu-mips64el
169+
164170
FROM scratch AS binaries-linux
165171
COPY --link --from=runc /usr/bin/runc /buildkit-runc
166-
# built from https://github.com/tonistiigi/binfmt/releases/tag/buildkit%2Fv9.2.0-50
167-
COPY --link --from=tonistiigi/binfmt:buildkit-v9.2.0-50@sha256:ff21b00e7238dce3bbd74fbe25591f7213837a77861b47b2df5e019540ec33fa / /
172+
COPY --link --from=binfmt-filter /out/ /
168173
COPY --link --from=cni-plugins-export-squashed / /
169174
COPY --link --from=buildctl /usr/bin/buildctl /
170175
COPY --link --from=buildkitd /usr/bin/buildkitd /

solver/llbsolver/ops/exec_binfmt.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ var qemuArchMap = map[string]string{
2727
"riscv64": "riscv64",
2828
"arm": "arm",
2929
"s390x": "s390x",
30-
"ppc64": "ppc64",
3130
"ppc64le": "ppc64le",
3231
"386": "i386",
3332
}

0 commit comments

Comments
 (0)