What does this MR do?
- Builds the ARM64 binary and runner helper image.
- builds Docker images for both ARM and ARM64 runners.
Using Alpine as base image because of its minimal footprint which is best suitable for embedded devices, resulting in
:arm64 tags for both runner and runner helper images.
Why was this MR needed?
Usage of ARM and ARM64 is rapidly growing and a runner for those architectures would be really useful, although the runner for ARM already exists, there is no (official) docker image for such binary unlike the AMD64 one. About the ARM64 binary, it doesn't exist, and the only way to have one was building it from source, plus it needs an (official-dockerized) runner-helper to be pulled in order to run its tasks.
Are there points in the code the reviewer needs to double check?
Does this MR meet the acceptance criteria?
Documentation created/updated (Docs for different runner versions (architectures) may be created).
Added for this feature/bug
All builds are passing
Branch has no merge conflicts with
What are the relevant issue numbers?
- It would be great if the binaries for both ARM & ARM64 are built as static binaries adding
-ldflags="-s -w"and compressed using upx-ucl and then used in the Docker images, this would reduce the image footprint even more and be better suitable for embedded devices as well. One thing I can't tell for sure is if this would impact the binary performance adversely.
$ uname -a Linux Millennium-Falcon 4.9.13-bee42-v8 #1 SMP PREEMPT Fri Mar 3 16:42:37 UTC 2017 aarch64 aarch64 aarch64 GNU/Linux $ ls -lsh . 60M -rwxr-xr-x 1 rancher rancher 60M Jun 21 05:23 gitlab-ci-multi-runner-linux-arm64 $ upx -9 gitlab-ci-multi-runner-linux-arm64 $ ls -lsh . 19M -rwxr-xr-x 1 rancher rancher 19M Jun 21 05:23 gitlab-ci-multi-runner-linux-arm64
- I used the official Dockerfile as base to write the other ones, but this can be optimized by decreasing the number of layers within the file itself as in this Dockerfile I wrote for an ARM GitLab Runner image I built, going from 12 layers as showed in Microbadger to 8 or 9 as showed in Microbadger for the GitLab Runner image I built .