CNG: gitlab-rails image contains excess
Summary
The current state of gitlab-rails-{c,e}e
(and containers based on them) contains excess that could and should be trimmed.
Details
As part of the build process for this image, we unpack an entire copy of the gitlab-org/gitlab codebase into the container.
- With the migration of gitlab-org/gitlab-workhorse into gitlab-org/gitlab (gitlab-org&4826 (closed)), we now include the complete source for Workhorse in
/srv/gitlab/workhorse
(6.4M) - We ship the entire QA suite (2.5M)
-
Can we separate some portion of the assets in
public/
just for Workhorse container? I think we've explored this in some degree in the past, but hit the first "bump" when some part of the Rails code needed a file. The folderpublic/assets/
itself is 220MB
item | size | comment |
---|---|---|
workhorse/ | 6.4 MB | waste |
qa/ | 2.5 MB | waste |
log/ | 9.6 kB | should be cleaned, post Bootsnap |
scripts/ | 187 kB |
|
rubociop/ | 189 kB | Development oriented |
.gitlab/ | 333 kB | CI / project |
public/ | 224 MB |
|
There may be others not in this table, but these are an initial view.
Concerns
Several things need to be evaluated when we look at what we can do to reduce the disk usage here:
- Can we "filter" what code ends up inside the container, appropriately within the context and binding of our licensing?
- Which items should be cleaned up?
- Which items can be cleaned up?
Edited by Jason Plum