Add arm64 Docker images for gitlab/gitlab-runner
What does this MR do?
This MR adds ARM64 Alpine/Ubuntu Docker images and makes images multi-platform. I've pushed an example to my Docker Hub space: pombeirp/gitlab-runner .
Once this MR is merged, a follow-up PR to add support for 32-bit ARM should be very straightforward. It would also be nice to have the gitlab-runner-helper image be published as a multi-platform image, rather than relying on tags.
Why was this MR needed?
There is a desire to have the GitLab Runner Docker image run on ARM64 platforms. See #2076 (closed).
Manual QA can be found
Are there points in the code the reviewer needs to double check?
- This MR removes the
releasetag since that build agent doesn't have a recent Linux kernel required by this MR.
- This MR leverages the new
docker buildxcommand which is experimental (added in a separate MR). The previous way of building multi-platform images involved a community tool called manifest-tool.
docker buildxbuilds multi-platform images, those images cannot be loaded into the local image registry, they must be pushed directly to a remote registry. Therefore we'll need to tag and push the images directly when building, requiring some changes in the
- In order to use
docker buildxsuccessfully, we need to create:
- a docker context (which contains the location of the host and certificate information)
- a build node that uses the
docker-containerdriver rather than the default
- a host containing a Linux kernel with version >= 4.8
binfmt_misccorrectly installed on the host and with handlers for AMR64 binaries (we do this in
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes)
- When publishing, we use the newer
buildxlogic in the
xbuild_and_publishfunction. If building locally, we fallback to the existing logic (because
buildxdoesn't support adding incompatible platforms to the
Does this MR meet the acceptance criteria?
- Documentation created/updated
- Added tests for this feature/bug - N/A
In case of conflicts with
master- branch was rebased
What are the relevant issue numbers?
Closes #2076 (closed)