yobasystems / gitlab-runner

Gitlab Runner on Alpine Linux [Docker]
https://hub.docker.com/r/yobasystems/gitlab-runner/
21 stars 7 forks source link

Dockerfile for yobasystems/gitlab-runner:aarch64-helper-11-2? #1

Closed flamechair closed 5 years ago

flamechair commented 5 years ago

Hi there,

I'm a huge fan of your gitlab runner images and how they're multi-arch. I noticed that you provide a docker image for all architectures for gitlab-runner, but not for yobasystems/gitlab-runner:aarch64-helper-11-2. Would you be able to provide the docker file for this? I'd be very grateful.

Thank you once again!

dominictayloruk commented 5 years ago

There is no alpine image for aarch64, and the runner is based on gitlab runner version 11.2, but it's a fully functional aarch64/arm64v8 image.

docker pull yobasystems/gitlab-runner:aarch64
docker pull yobasystems/gitlab-runner:aarch64-helper-11-2
docker tag yobasystems/gitlab-runner:aarch64-helper-11-2 gitlab-runner-helper:11.2.0

sudo docker run -d --name=gitlab-runner --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v /data/gitlab-runner/config:/etc/gitlab-runner yobasystems/gitlab-runner:aarch64
dominictayloruk commented 5 years ago

There is no dockerfile, but you could use the following link and choose the aarch64 tag

https://microbadger.com/images/yobasystems/gitlab-runner

It took a lot of messing but until gitlab-runner packages are built for aarch64, this is the easiest option.

Take a look here for progress

https://gitlab.com/gitlab-org/gitlab-runner/merge_requests/725

flamechair commented 5 years ago

I'm asking about the image tag aarch64-helper-11-2, not the gitlab-runner image itself. Its specifically built for aarch64 so I wanted to see if you could show me how you build that specific tag

I followed the link you posted and selected the aarch64-helper-11-2 tag and it was just blank:

Pic

dominictayloruk commented 5 years ago

If I remember, there are some docker images created in the gitlab runner script that pull these images. I looked at the armhf one and manipulated it for aarch64. I have all the reference files and things saved somewhere, but I'm on my mobile at the minute

flamechair commented 5 years ago

Okay, absolutely no rush at all. If there is any possibility that you have a chance to provide them, that would be wonderful, thank you!

dominictayloruk commented 5 years ago

In fact 1, I spun up a aarch64 vm on scaleway, installed the gitlab-runner .deb version 11.2 from the Debian repo and watched what binaries it generated, which docker images it pulls or builds 2, Adapted them all to be aarch64 as I think they default to amd64, built the images 3, Copied all files that were installed locally on the VM then replicated in a docker container via exec re running the commands.

flamechair commented 5 years ago

Interesting, and this is a one time process that you do per gitlab-runner version? Have you considered automating this process or is it not feasible?

dominictayloruk commented 5 years ago

Its a one time process full stop, there are no other versions to update. There are no binaries for aarch64, only 32 bit arm binaries (Which will not run on 64bit only arm machines).

This image uses the Debian repos for 11.2 and currently the latest version is 11.8. Download link is here gitlab-runner_11.2.0+dfsg-2_arm64.deb on 64-bit ARMv8 machines

There is a merge request which has been ongoing for some time if you follow the link; https://gitlab.com/gitlab-org/gitlab-runner/blob/e14f0acbeb6c95d5c405367c950506bd45a39345/dockerfiles/alpine/Dockerfile.arm64

Once official binaries are released my image :aarch64 will then be the same alpine version that builds automatically with all the other arch's (amd64/armhf).

Until then your stuck with what I've shared 😄

If your wanting to get a newer build then you need to look at compiling the runner binaries on aarch64 really then the dockerfile is already in the repo to work for the latest version. The helper binaries would also need to be compiled.

dominictayloruk commented 5 years ago

More info and further reading;

https://gitlab.com/gitlab-org/gitlab-runner/tree/e14f0acbeb6c95d5c405367c950506bd45a39345/executors/docker

flamechair commented 5 years ago

Thank you!