Convert gemnasium image to be ubi-micro based
-
Please check this box if this contribution uses AI-generated content (including content generated by GitLab Duo features) as outlined in the GitLab DCO & CLA
What does this MR do?
Dockerfile file so that the final image is based on ubi8-micro image.
Refactor the
The Dockerfile was refactored so that the final image is based on ubi8-micro instead of ubi8-minimal. A ubi8 image is used as the build stage.
In the build stage a alternate file system is created at the ARG DNF_INSTALL_ROOT
location. To start with, the entire file system of ubi8-micro is copied in this location:
COPY --from=initial / ${DNF_INSTALL_ROOT}/
This file system is then used as the destination for installing software required in the final image. ARG DNF_OPTS_ROOT
is used to pass options to the dnf
commands so the software is installed in alternate location(DNF_INSTALL_ROOT). This location is also used to copy files/directories from local file system and from previous stages as well as for changing file permissions required in the final image.
Once the changes to DNF_INSTALL_ROOT
are completed, this file system is copied to the root of the final image based on ubi8-micro.
Any changes/installations that cannot be done using alternate paths, such as, composer update
, npm install -g yarn
etc. are then done in the final image.
What are the relevant issue numbers?
Does this MR meet the acceptance criteria?
-
Changelog entry added -
Documentation created/updated for GitLab EE, if necessary -
Documentation created/updated for this project, if necessary -
Documentation reviewed by technical writer or follow-up review issue created -
Tests added for this feature/bug -
Job definition updated, if necessary -
Conforms to the code review guidelines -
Conforms to the Go guidelines -
Security reports checked/validated by reviewer