-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Platform now added in manifest for platform specific images #17896
Comments
Yes, this happened with docker-library/meta-scripts#93. We finally have switched all our builds over to $ docker run -i --rm gcr.io/go-containerregistry/crane manifest arm64v8/debian | jq .
{
"schemaVersion": 2,
"mediaType": "application/vnd.oci.image.index.v1+json",
"manifests": [
{
"mediaType": "application/vnd.oci.image.manifest.v1+json",
"digest": "sha256:e2554fa0cd89eec5865aef4bf094c8d646059d37c42b44a6655839ea46ef3f90",
"size": 1041,
"platform": {
"os": "linux",
"architecture": "arm64",
"variant": "v8"
},
"annotations": {
"com.docker.official-images.bashbrew.arch": "arm64v8",
"org.opencontainers.image.base.name": "scratch",
"org.opencontainers.image.created": "2024-11-12T00:55:54Z",
"org.opencontainers.image.revision": "dde41269a09feb7d5b046133bdd54c918ecbf1ca",
"org.opencontainers.image.source": "https://github.com/debuerreotype/docker-debian-artifacts.git#dde41269a09feb7d5b046133bdd54c918ecbf1ca:bookworm",
"org.opencontainers.image.url": "https://hub.docker.com/_/debian",
"org.opencontainers.image.version": "bookworm"
}
},
{
"mediaType": "application/vnd.oci.image.manifest.v1+json",
"digest": "sha256:75a53f5cf6b17ed7544a6de47a5a405a0fb20abb4fb0795e4ad13fe6dd5d6536",
"size": 840,
"platform": {
"os": "unknown",
"architecture": "unknown"
},
"annotations": {
"com.docker.official-images.bashbrew.arch": "arm64v8",
"vnd.docker.reference.digest": "sha256:e2554fa0cd89eec5865aef4bf094c8d646059d37c42b44a6655839ea46ef3f90",
"vnd.docker.reference.type": "attestation-manifest"
}
}
]
} |
Thanks for the confirmation! What's the goal to restrict the platform this way? |
Im curious as to why you are using the architecture namespace instead of |
This is a multi-stage build involving arm64 and amd64 images to provide a container combining wine (arm64) and qemu-aarch64, to run this on amd64 hosts. see this change. But now we have to explicitely add platform parameter, probably it's better to switch to official debian image. It was just convenient to have those images per architecture with different names. |
My main use case personally for the per-architecture images is to avoid the "vector matching" behavior and get an exact match -- for example, if I do |
I was hit by this issue as well. I'm used to do the equivalent of I actually do it for a bunch of Alpine platforms:
However I'm hitting this problem only with 3.20/riscv64 (logs) and 3.17/ppc64le (logs), arm64 and arm32 still work nicely. |
As you'll need to start adding --platform parameter when running and building images, It's probably time for you to migrate to official alpine images instead of docker architecture ones. Once I did the --platform change, switching to official debian worked seamlessly. |
I get that adding |
Using |
All the architecture specific repos as listed in the readme are official images as much as the empty namespace (aka |
@yosifkit Yes, but now platform is embedded into it, what's the point to use those images vs official ones with |
Like @tianon's comment, the arch specific repos are still useful to avoid the platform vector matching that is used when pulling multi-arch images. In other words, to guarantee getting a specific architecture or an error. The platform flag is asking for an image compatible with the supplied architecture, not exactly one specific architecture. For example, say the |
Thanks for mentioning that. However, from your first answer on this thread, it seems like the change was not intentional, and a side effect of building with buildkit. |
You're correct that we don't love that this changed for us -- right now we can't easily fix it due to complexities in our deployment pipeline, but we hope that someday we could consider doing so. Either way, it's definitely recommended to be explicit about |
This is to work around docker-library/official-images#17896
platform now appears to be required due to a change in Docker docker-library/official-images#17896 Change-Id: I3d4a3dee3cc3888316c2cff3d2343fef98acfd47
platform now appears to be required due to a change in Docker docker-library/official-images#17896 Change-Id: I063bc60106964440d263e615803fba88da48dbd4
From an x64 machine,
Same when trying to run an amd64 image from an arm64 host.
This used to work until very recently (~ weeks), and I suspect the image is now built with an explicit
--platform
parameter on your side.Even though it's possible to explicitly add a --platform on our side, it used to be very convenient to not have to do it for cross compilation scenarios and multi stage builds involving multiple architectures. It's definitely a niche usage though.
Was this changed recently?
What was the rationale?
The text was updated successfully, but these errors were encountered: