You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
❯ docker container run --rm --platform linux/arm64 ghcr.io/frezbo/crane@sha256:19c3381936030184e4d692aeb04bee2a4833dfbd2e0a384238844fbdb2a5a034
Unable to find image 'ghcr.io/frezbo/crane@sha256:19c3381936030184e4d692aeb04bee2a4833dfbd2e0a384238844fbdb2a5a034' locally
ghcr.io/frezbo/crane@sha256:19c3381936030184e4d692aeb04bee2a4833dfbd2e0a384238844fbdb2a5a034: Pulling from frezbo/crane
59bf1c3509f3: Already exists
eb23a3f25c9b: Already exists
47db48988e06: Pull complete
Digest: sha256:19c3381936030184e4d692aeb04bee2a4833dfbd2e0a384238844fbdb2a5a034
Status: Downloaded newer image for ghcr.io/frezbo/crane@sha256:19c3381936030184e4d692aeb04bee2a4833dfbd2e0a384238844fbdb2a5a034
docker: Error response from daemon: image with reference ghcr.io/frezbo/crane@sha256:19c3381936030184e4d692aeb04bee2a4833dfbd2e0a384238844fbdb2a5a034 was found but does not match the specified platform: wanted linux/arm64, actual: linux/amd64.
See 'docker run --help'.
Here arm64 doesn't work and trying to run amd64 shows that the amd64 manifest has been replaced by the arm64 binary
❯ docker container run --rm --platform linux/arm64 ghcr.io/frezbo/crane@sha256:19c3381936030184e4d692aeb04bee2a4833dfbd2e0a384238844fbdb2a5a034 /crane
Unable to find image 'ghcr.io/frezbo/crane@sha256:19c3381936030184e4d692aeb04bee2a4833dfbd2e0a384238844fbdb2a5a034' locally
ghcr.io/frezbo/crane@sha256:19c3381936030184e4d692aeb04bee2a4833dfbd2e0a384238844fbdb2a5a034: Pulling from frezbo/crane
Digest: sha256:19c3381936030184e4d692aeb04bee2a4833dfbd2e0a384238844fbdb2a5a034
Status: Image is up to date for ghcr.io/frezbo/crane@sha256:19c3381936030184e4d692aeb04bee2a4833dfbd2e0a384238844fbdb2a5a034
docker: Error response from daemon: image with reference ghcr.io/frezbo/crane@sha256:19c3381936030184e4d692aeb04bee2a4833dfbd2e0a384238844fbdb2a5a034 was found but does not match the specified platform: wanted linux/arm64, actual: linux/amd64.
See 'docker run --help'.
# removing the local cache
❯ docker image rm ghcr.io/frezbo/crane@sha256:19c3381936030184e4d692aeb04bee2a4833dfbd2e0a384238844fbdb2a5a034
Untagged: ghcr.io/frezbo/crane@sha256:19c3381936030184e4d692aeb04bee2a4833dfbd2e0a384238844fbdb2a5a034
Deleted: sha256:a2054f1a0cf4a325c9dc9b80ca4087cffdc867991ebc07bfe24901a41e90e61d
Deleted: sha256:193f0d05cb11ebe943aadf29b473f45ef3472ec38832c8d10396351868795170
❯ docker container run --rm --platform linux/amd64 ghcr.io/frezbo/crane@sha256:19c3381936030184e4d692aeb04bee2a4833dfbd2e0a384238844fbdb2a5a034 /crane
Unable to find image 'ghcr.io/frezbo/crane@sha256:19c3381936030184e4d692aeb04bee2a4833dfbd2e0a384238844fbdb2a5a034' locally
ghcr.io/frezbo/crane@sha256:19c3381936030184e4d692aeb04bee2a4833dfbd2e0a384238844fbdb2a5a034: Pulling from frezbo/crane
59bf1c3509f3: Already exists
eb23a3f25c9b: Already exists
47db48988e06: Pull complete
Digest: sha256:19c3381936030184e4d692aeb04bee2a4833dfbd2e0a384238844fbdb2a5a034
Status: Downloaded newer image for ghcr.io/frezbo/crane@sha256:19c3381936030184e4d692aeb04bee2a4833dfbd2e0a384238844fbdb2a5a034
Hey crane from arm64
The text was updated successfully, but these errors were encountered:
This is a known limitation. crane append currently appends the tarball onto the single-platform image located using --platform (default is linux/amd64), then pushes a single-platform image back up. It doesn't attempt to update the original multi-platform image to reference the new image it pushed, though docker manifest create --amend should be able to do this for you.
In general I agree crane append (and crane mutate, and crane in general, in lots of places) should do better here. I don't even think the code to do it is hard, just the UX for how we want this all to work. Sometimes you really do want to pull a single image from an index, modify it, and push it back, and differentiating that from the multi-arch use case you describe might be tricky.
This issue is stale because it has been open for 90 days with no
activity. It will automatically close after 30 more days of
inactivity. Keep fresh with the 'lifecycle/frozen' label.
Scenario:
A simple go app created for
amd64
andarm64
and saved to tarballs namedcrane_amd64.tar
andcrane_arm64.tar
Now creating an image based on alpine using
crane append
Running the amd64 image
Now appending the arm64 edition to a previously created amd64 image tag
Running the arm64 image (doesn't work)
Appending to based on alpine (works)
Running the above created image:
Appending arm64 binary to tag
0.1.0
Trying to run both arm64 and amd64
Here arm64 doesn't work and trying to run amd64 shows that the amd64 manifest has been replaced by the arm64 binary
The text was updated successfully, but these errors were encountered: