-
Notifications
You must be signed in to change notification settings - Fork 10
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
Enable Arm64 images with qemu #5
base: main
Are you sure you want to change the base?
Conversation
Enable Arm64 images with qemu Signed-off-by: Jingzhao Ni <[email protected]>
What kind of images are you proposing to build? Can the existing test suite be extended to validate that these changes enable that to happen? |
Hi, Sgerrand, |
👋 I will try to review these changes tonight. |
Hi, any comments? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for submitting this proposal. The Docker images for this repository are currently being automatically built on Docker Hub, so any change to support ARM (64 bit or otherwise) will require reconfiguring the way that images are built, tagged and pushed.
The changes here are not ready to be merged and used as is, but I'd like to cherry pick some of the ideas you've provided in order to provide an ARM based image for people who'd like to build Alpine Linux packages for that architecture.
Thanks again!
RUN curl -fsSL https://github.com/multiarch/qemu-user-static/releases/download/v${QEMUVERSION}/qemu-${QEMUARCH}-static.tar.gz | tar zxvf - -C /usr/bin | ||
RUN chmod +x /usr/bin/qemu-* | ||
|
||
FROM ${IMAGEARCH}alpine:3.11 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🙋 The two Alpine versions don't match. Was this intentional?
ARG QEMUVERSION=4.0.0 | ||
ARG QEMUARCH | ||
|
||
SHELL ["/bin/ash", "-o", "pipefail", "-c"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🙋 Is it necessary to change the default shell options? You could break the curl | tar
command into separate RUN
steps and the resulting build would be easier to debug (e.g. if there were issues with a network connection to https://github.com).
ARG IMAGEARCH | ||
FROM alpine:3.12 as qemu | ||
RUN apk add --no-cache curl | ||
ARG QEMUVERSION=4.0.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🙋 This version of QEMU for multiple architectures is over a year old now. Could a more recent version be used instead? Even the v4.0.x series has had v4.0.0-4 released subsequently.
# Build x86 images | ||
docker build --build-arg IMAGEARCH= \ | ||
--build-arg QEMUARCH="x86_64" \ | ||
--file Dockerfile --tag sgerrand/alpine-abuilder:amd64 . --pull |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🙋 The images for this project are currently tagged by Alpine version. I'd prefer to keep that prefix in front of any architecture related tag, such as amd64
.
# Build arm64 image | ||
docker build --build-arg IMAGEARCH="arm64v8/" \ | ||
--build-arg QEMUARCH="aarch64" \ | ||
--file Dockerfile --tag sgerrand/alpine-abuilder:arm64 . --pull |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As per the previous comment.
Enable Arm64 images with qemu
Signed-off-by: Jingzhao Ni [email protected]