Use daemon or runtime provided arch instead of amd64 #232
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The current
defaultPlatform
functions sets the architecture to "amd64", which causes pack to use theamd64
build image, and to install theamd64
lifecycle, when creating a new builder from anarm64
host with no docker daemon installed.This changes the default platform functions to use the docker daemon os and architecture for local images, and
runtime.GOARCH
as the architecture for new remote images.The following log file is the output of a script that was used to identify the issue.
https://github.com/jericop/github-actions/blob/main/buildpacks/create-multi-arch-builders/standalone/imgutil-pr-232-verify-amd64-issue.sh.log
You can see that the script doesn't finish. You can also see that it downloads an
amd64
lifecycle rather than thearm64
as expected.https://github.com/jericop/github-actions/blob/main/buildpacks/create-multi-arch-builders/standalone/imgutil-pr-232-verify-amd64-issue.sh.log#L159
The following log file is the output of a script was used to identify that an updated version of pack that uses this fix.
https://github.com/jericop/github-actions/blob/main/buildpacks/create-multi-arch-builders/standalone/imgutil-pr-232-verify-fix.sh.log