Update docker-delivery workflow to create multi-arch images #1856
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.
Summary
This PR updates the delivery-docker CI workflow to publish multi-arch images that support linux/amd64 and linux/arm64.
This change is needed in order to facilitate broader arm64 support in the buildpacks eco-system. I had to work around this limitation in this proof-of-concept repo and it will be needed in order to add multi-arch support to paketo stacks and builders.
The current image is built using pack and only supports linux/amd64 architecture. The new approach uses a dockerfile and buildx. I added the
pack_version
build arg to the dockerfile so that you can pass the version you want tomake
. See below for manual test and verification.If you prefer to not have a dockerfile in the repo I can embed it in a heredoc in the docker-delivery workflow. Just let me know.
Output
Here is output of building the multi-arch image manually and pushing to an ephemeral registry (ttl.sh). You can run this locally to confirm it works as expected.
Before
Today the buildpacksio/pack image can only be pulled on the linux/amd64 platform.
After
Afterwards the buildpacksio/pack image can be pulled on linux/amd64 and linux/arm64 platforms.
Documentation
I don't think documentation is needed for this CI change, but I'm happy to add any if requested.
Related
Resolves #1579