-
Notifications
You must be signed in to change notification settings - Fork 116
Description
GOAL: Support buildpack builds for ARM images
** WARNING** Not yet ready to implement, may require RFCs, spec changes and/or imgutil changes.
Lifecycle Behavior
analyzer
- If the previous image is a multiarch image, select the child manifest that matches the runtime architecture of the build environment.
- Warn and proceed without analyzing the previous image if there the image exists but has the wrong architecture.
Because analyzer may run in a lifecycle image rather than in the build environment the runtime architecture of the analyze phase may not match the build environment. We need an RFC to either:
- Record the information in
detectorand pass it toanalyzer. - Accept an
-archflag and fail if the previous image is a multiarch image and the-archflag is not provided by the platform
exporter
- If the
run-imageis a multiarch image, select the child manifest that matches the runtime architecture of the build environment. - Fail if there is no
run-imagewith the correct architecture - If there was a previous image, validate that the previous image architecture and the run image architecture match.
Because exporter may run in a lifecycle image rather than in the build environment the runtime architecture of the analyze phase may not match the build environment. We need an RFC to either:
- Record the information in a previous phase and pass it to
analyzer. - Accept an
-archflag and fail if the previous image is a multiarch image and the-archflag is not provided by the platform
rebaser
- If the
run-imageis a multiarch image, select the child manifest that matches the app image architecture - If the
run-imageis not a multiarch imagerebasershould validate that the architecture matches the app-image before rebasing.
Lifecycle Artifacts
Publish ARM lifecycle artifacts
Add the following new Makefile targets:
make build-linux-x86-64make build-linux-arm64make build-windows-x86-64make build-windows-arm64make package-linux-x86-64make package-linux-arm64make package-windows-x86-64make package-windows-arm64
Binaries should end up inout/<os>/<arch>.
And update the existing targets:
make build-linux->make build-linux-x86-64&&make build-linux-arm64make build-windows->make build-windows-x86-64&&make build-windows-arm64make package-linux->make package-linux-x86-64&&make package-linux-arm64make package-windows->make package-windows-x86-64&&make package-windows-arm64
Local ARM image builds
Add the following new Makefile targets:
make build-image-linux-amd64make build-image-linux-arm64make build-imageshould create a multiarch image containing a windows image and both linux architectures.
Docker desktop should support both building for multiple architectures. I do not know if a daemon running on a x86 linux machine will allow us to load arm64 images.
Note We cannot publish arm windows images becausemcr.microsoft.com/windows/servercore:ltsc2019 does not include an arm manifest (unlikemcr.microsoft.com/windows/nanoserver:1809 which we recently moved away from).
Publish ARM images
Instead of publish buildpacksio/lifecycle:<commit>-linux images for each build, publish
buildpacksio/lifecycle:<commit>-linux-amd64buildpacksio/lifecycle:<commit>-linux-arm64
The buildpacksio/lifecycle:<commit> multiarch image should contain the windows image and both linux architectures.
When we release a new lifecycle version we should retag appropriate images with
buildpacksio/lifecycle:<version>-linux-amd64buildpacksio/lifecycle:<version>-linux-arm64buildpacksio/lifecycle:latest-linux-amd64buildpacksio/lifecycle:latest-linux-arm64
And ensure that both buildpacksio/lifecycle:latest and buildpacksio/lifecycle:<version> include both linux architectures.