CNG: gitlab-shell image contain excess
While looking at a proposal in https://gitlab.com/gitlab-org/gitlab-shell, I realized we should re-check our
gitlab-shell image for content & size, as "GitLab Shell is written in Go, and needs a Go compiler to build. It still requires Ruby to build and test, but not to run."
We're packaging this image based on
git-base, which includes
gitlab-ruby. We include the entire source code tree, and binaries. Both of these items are excessive.
This waste of space in the image:
- consumes space in our Registry's backing store
- consumes ingress for customers (docker pull)
- consumes significant disk space on active nodes
Steps to reproduce
dive registry.gitlab.com/gitlab-org/build/cng/gitlab-shell:latest and see that the final image is 973 MB
We have an image built with runtimes and compilers that are not needed, as source content that is a waste of space.
Container is based on
buster-slim), and has only the binaries and support items required by GitLab Shell & OpenSSH Server