Fix GitLab Runner Docker Packaging + bare install packages
Summary
With the move to GitLab 14.0 the GitLab runner packaging either seems to be extremely inefficient or broken. GitLab runner package sizes went from ~135MB to ~400MB and the Gitlab runner docker image went from ~600MB for non-alpine based images to ~1.6GB in size. This poses a problem for having what is supposed to be a lightweight and scalable build agent to something that takes long times to startup and transfer over some networks.
Reference Links
-
13.12 Runner Package Example: https://packages.gitlab.com/runner/gitlab-runner/packages/el/7/gitlab-runner-13.12.0-1.x86_64.rpm
-
14.0.1 Runner Package Example: https://packages.gitlab.com/runner/gitlab-runner/packages/el/7/gitlab-runner-14.0.1-1.x86_64.rpm
-
13.12 Runner Docker Container Example: https://hub.docker.com/layers/gitlab/gitlab-runner/v13.12.0/images/sha256-aa53ba22d716d3c69dd684ad4107bf75d2149526c568b4c1a855595a4e9de629?context=explore
-
14.0.1 Runner Docker Container Example: https://hub.docker.com/layers/gitlab/gitlab-runner/v14.0.1/images/sha256-531606a6c87fbd55453ed8ffa0e6b4e1b6dfe0c2e1bd6e8f077639a4995b98fe?context=explore
-
NOTE: These are compressed sizes as well for the docker image so the actual image is a lot bigger
Actual behavior
GitLab runner packages + the runner containers are overly stuffed with packages or are mispackaged with the wrong dependencies
Expected behavior
GitLab runner distributables should be scoped down to only include what is actually needed to make the software run and not much extra. The base ubuntu image from dockerhub is only ~30MB so layering on the gitlab-runner + dependencies should not add so much fluff and as for the runner packages for installation they seem to be mispackaged but should also be sliced down to what is needed to make the runner software work
Extra Info
The packages available on https://packages.gitlab.com/runner/gitlab-runner/ seem to be mispackaged as the files listed inside of the packages seem to include helper images for all different types of processor architectures as well as different flavors of linux