-
Notifications
You must be signed in to change notification settings - Fork 745
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
[Merged by Bors] - Multiarch docker GitHub actions #2065
[Merged by Bors] - Multiarch docker GitHub actions #2065
Conversation
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 is awesome!
I'm inclined to merge soon, although I'd like to see how long it takes to run on Github's runners. Maybe we could temporarily tweak the build rules to run for this PR?
To help performance along I think removing lcli
is a good idea, and we could maybe even try to merge my PR to reduce compilation time (#1989). I'll work on updating it today so it's ready to go.
#!/bin/bash | ||
|
||
# Build hook to run on Docker Hub to ensure that the image is built with `PORTABLE=true`. | ||
docker build --build-arg PORTABLE=true -f $DOCKERFILE_PATH -t $IMAGE_NAME . |
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.
I think as well as deleting this file we'll need one of the DockerHub admins to disable the DockerHub build (we can tag Paul/Age when the time is right).
Removed the |
I disabled my local runner to test on a Github hosted runner (didn't realize you could use these for free) and kicked off a build on |
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.
Happy to merge once the builds on your repo succeed. Hopefully #1989 will have merged by then too.
The builds on my repo have succeeded, and I tested out the |
Awesome! I think we can merge, and then disable the old docker build once it lands. We'll only update the bors r+ |
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.
Nice! This looked like it would have been super fiddly.
Big benefit to users and devs in this one 🚀
## Issue Addressed Resolves #1512 ## Proposed Changes - Adds a new docker Github Actions workflow - Removes the Dockerhub hook - Adds a new Dockerfile for use with pre-existing cross-compiled binaries - on pushes to `unstable` - builds an ARM64 image and tags it `latest-arm64-unstable` - builds an AMD64 image and tags it `latest-amd64-unstable` - builds an multiarch image by creating a manifest list referencing the prior two images and tags it `latest-unstable` - on pushes to `stable` - builds an ARM64 image and tags it `latest-arm64` - builds an AMD64 image and tags it `latest-amd64` - builds an multiarch image by creating a manifest list referencing the prior two images and tags it `latest` ## Additional Info - for ARM64, first `cross` is used to cross compile the `lighthouse` and `lcli` binaries, then `docker buildx` is installed to actually build the docker image for the correct target platform. The image build pretty much just copies the binaries from local into the docker image (thanks @michaelsproul :) ) - The AMD64 and ARM64 builds run in parallel, in total it's been taking around 45mins on a local runner - This PR does **not** cover version tags on docker images at the moment Co-authored-by: realbigsean <seananderson33@gmail.com>
Pull request successfully merged into unstable. Build succeeded: |
🎉 🎉 🎉 |
Issue Addressed
Resolves #1512
Proposed Changes
unstable
latest-arm64-unstable
latest-amd64-unstable
latest-unstable
stable
latest-arm64
latest-amd64
latest
Additional Info
cross
is used to cross compile thelighthouse
andlcli
binaries, thendocker buildx
is installed to actually build the docker image for the correct target platform. The image build pretty much just copies the binaries from local into the docker image (thanks @michaelsproul :) )