Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explicitly set the target platform of Docker builds #48

Merged

Conversation

nyanmisaka
Copy link
Member

Recently an error popped up when I was building an arm64 image on amd64:

#4 [internal] load metadata for docker.io/arm64v8/debian:bookworm-slim
#4 ERROR: no match for platform in manifest: not found

#3 [internal] load metadata for docker.io/library/node:20-alpine
#3 CANCELED

#5 [internal] load metadata for docker.io/multiarch/qemu-user-static:x86_64-aarch64
#5 CANCELED
------
 > [internal] load metadata for docker.io/arm64v8/debian:bookworm-slim:
------
Dockerfile:91
--------------------
  89 |     #
  90 |     FROM multiarch/qemu-user-static:x86_64-${QEMU_ARCH} as qemu
  91 | >>> FROM ${IMAGE_ARCH}/debian:${OS_VERSION}-slim as combined
  92 |
  93 |     ARG OS_VERSION
--------------------
ERROR: failed to solve: arm64v8/debian:bookworm-slim: failed to resolve source metadata for docker.io/arm64v8/debian:bookworm-slim: no match for platform in manifest: not found

uraimo/run-on-arch-action#155
docker-library/python#933 (comment)

We've been slowly moving Official Images to a new build process and moved python yesterday, so now the arch-specific namespaces are an image index because they include attached provenance/sbom metedata.

It was caused by some upstream changes, where now the FROM directive requires you to explicitly set the platform type for multi-arch builds.

https://docs.docker.com/reference/dockerfile/#from

The optional --platform flag can be used to specify the platform of the image in case FROM references a multi-platform image. For example, linux/amd64, linux/arm64, or windows/amd64. By default, the target platform of the build request is used.

Their documentation is also out of date and does not reflect this new behavior.

@joshuaboniface joshuaboniface merged commit 878d8e1 into jellyfin:master Nov 14, 2024
@nyanmisaka nyanmisaka deleted the fix-docker-target-platform branch November 14, 2024 03:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants