CNG: Refactor containers to fetch and build pattern
Summary
From gitlab-org/build/CNG!870 (comment 828742975)
The
gitlab-container-registry
needs to be refactored to use our current pattern of downloading/extracting code in a separate shell script and not in the container definition.
In reality, we need to make a larger concerted effort to improve the maintainability of these image, which includes DRY-ing patterns which are common across all containers.
Current behavior
Several containers perform Fetch & Build are in a single RUN
, and a complex one with many ... \ && ... \ && ...
.
Expected behavior
- Use
gitlab-fetch
for UBI where appropriate - Use
scripts/download
(&scripts/build
) where appropriate for external sources.-
scripts/download
implements functionality to ensure checksums
-
- Use consistent, DRY fetching method for Debian
- Ideally, independent of
git
calls
- Ideally, independent of