-
Notifications
You must be signed in to change notification settings - Fork 297
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
When creating a buildpack with docker buildx --platform linux/arm64
pack does not set the architecture
#2079
Comments
I believe this change also addresses #1968, which was fixed by adding retry logic. |
I will take this issue, as I already did some changes in imgutil related to it :) |
With the implementation of RFC 0128 you don't need to use From your Dockerfile configuration, you just need to do is: pack buildpack package ttl.sh/jericop-hello-world-buildpack:${image_arch} --publish \
--path samples/buildpacks/hello-world \
--target linux/amd64 \
--target linux/arm64 and Using the binary from the open PR I did this: > $PACK_BINARY buildpack package ttl.sh/jjbustamante-hello-world-buildpack:${image_arch} --publish --path samples/buildpacks/hello-world --targe
t linux/amd64 --target linux/arm64
Successfully pushed manifest list ttl.sh/jjbustamante-hello-world-buildpack: to registry
Successfully published package ttl.sh/jjbustamante-hello-world-buildpack: and saved to registry
# Inspect the Index
> crane manifest ttl.sh/jjbustamante-hello-world-buildpack | jq .
{
"schemaVersion": 2,
"mediaType": "application/vnd.oci.image.index.v1+json",
"manifests": [
{
"mediaType": "application/vnd.oci.image.manifest.v1+json",
"size": 402,
"digest": "sha256:46ee213ae13e9e33a486f95780bdd09cda71955bcb55d4ceffe423265c752e3f",
"platform": {
"architecture": "amd64",
"os": "linux"
}
},
{
"mediaType": "application/vnd.oci.image.manifest.v1+json",
"size": 402,
"digest": "sha256:11d69032ed77c74be777d081321af19617fb1acd660f02b01f7ec46b85481130",
"platform": {
"architecture": "arm64",
"os": "linux"
}
}
]
}
# Inspecting each digest
> crane config ttl.sh/jjbustamante-hello-world-buildpack@sha256:11d69032ed77c74be777d081321af19617fb1acd660f02b01f7ec46b85481130 | jq .architecture
"arm64"
> crane config ttl.sh/jjbustamante-hello-world-buildpack@sha256:46ee213ae13e9e33a486f95780bdd09cda71955bcb55d4ceffe423265c752e3f | jq .architecture
"amd64
I think this is the expected output, right? |
Summary
The following occurs when running pack from a dockerfile using
docker buildx build
. When creating a buildpack withpack buildpack package
the architecture is always an empty string, regardless of the architecture you run on.This issue is similar to #1958, except that it affects
pack buildpack package
instead ofpack builder create
.Reproduction
Note that docker needs to be configured to build multi-arch images for this to work as described here.
Steps
docker buildx
command to create and publish buildpacks to ttl.sh, an ephemeral registry.Current behavior
The architecture is empty, which prevents building multi-arch images without modifying the image or doing some
docker manifest
magic.Expected behavior
The architecture should match the architecture that pack is running on.
Environment
pack info
docker info
The text was updated successfully, but these errors were encountered: