CNG: Reduce complexity, extend use of multi-stage Dockerfile patterns
## Summary As we're making use of multi-stage Dockerfile builds, we can re-examine the steps involved in each Dockerfile to remove complexity. ## Current behavior - [x] [gitlab-workhorse](https://gitlab.com/gitlab-org/build/CNG/blob/master/gitlab-workhorse/Dockerfile#L16-31) has a complex build step, bundling many `&&` into a single `RUN`. As the `builder` image is disposed of except for the final binaries, we can and should break this down and reduce wasted complexity - [ ] ~~[git-base](https://gitlab.com/gitlab-org/build/CNG/blob/master/git-base/Dockerfile#L10-40) has multiple complex `RUN` steps. If we _can_ remove the complication here and prepare a minimal final image out of this, we should.~~ `git-base` has been removed. - [x] [gitaly](https://gitlab.com/gitlab-org/build/CNG/blob/master/gitaly/Dockerfile#L36-53) has a complex step for the download & compilation of Gitaly, that likely has no need to be a part of the final container. - [x] [gitlab-go](https://gitlab.com/gitlab-org/build/CNG/blob/master/gitlab-go/Dockerfile) includes multiple steps in the final image that are in no way required to be a part of the final image (which only needs the final binary and links) - ... ## Expected behavior - Dockerfile `RUN` steps are simple to understand and safely alter - The final images of each build step are as bare as possible, ensuring reduction in size and software footprints
issue