Skip to content
Snippets Groups Projects

Native Step Runner Integration for Docker Executor

Merged Axel von Bertoldi requested to merge avonbertoldi/47414/steps-integration-docker into main
2 unresolved threads
Compare and Show latest version
8 files
+ 55
28
Compare changes
  • Side-by-side
  • Inline
Files
8
@@ -3,22 +3,36 @@ ARG UBI_MINIMAL_IMAGE=redhat/ubi9-minimal
FROM ${UBI_MICRO_IMAGE} AS initial
# Download the latest git-lfs for this distro from upstream's rpm repo since ubi9's version is always several releases
# behind. We'll install it in the next layer.
FROM ${UBI_MINIMAL_IMAGE} AS git-lfs
RUN microdnf install --best --refresh --assumeyes --nodocs --setopt=install_weak_deps=0 --setopt=tsflags=nodocs yum
RUN curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.rpm.sh | bash
RUN yum download git-lfs
RUN mv git-lfs*.rpm git-lfs.rpm
FROM ${UBI_MINIMAL_IMAGE} AS build
ARG DNF_OPTS_ROOT="--installroot=/install-root/ --noplugins --setopt=reposdir=/install-root/etc/yum.repos.d/ \
ARG DNF_OPTS_ROOT="--installroot=/install-root/ --noplugins --setopt=reposdir=/install-root/etc/yum.repos.d/ \
--setopt=varsdir=/install-var/ --config= --setopt=cachedir=/install-cache/"
RUN mkdir -p /install-root/ /install-var
COPY --from=initial / /install-root/
# these packages are required by downstream images, but we don't know anymore specifically which images require which
# These packages are required by downstream images, but we don't know anymore specifically which images require which
# packages.
RUN microdnf update ${DNF_OPTS_ROOT} --best --refresh --assumeyes --nodocs --setopt=install_weak_deps=0 --setopt=tsflags=nodocs
RUN microdnf install ${DNF_OPTS_ROOT} --best --refresh --assumeyes --nodocs --setopt=install_weak_deps=0 --setopt=tsflags=nodocs \
hostname procps tar gzip ca-certificates tzdata openssl git git-lfs findutils
RUN microdnf clean ${DNF_OPTS_ROOT} all \
RUN microdnf install ${DNF_OPTS_ROOT} --best --refresh --assumeyes --nodocs --setopt=install_weak_deps=0 --setopt=tsflags=nodocs \
hostname procps tar gzip ca-certificates tzdata openssl git findutils
# Install git-lfs from upstream's rpm package
COPY --from=git-lfs /git-lfs.rpm .
RUN rpm -i --root=/install-root/ ./git-lfs.rpm
RUN microdnf clean ${DNF_OPTS_ROOT} all \
&& rm -f /install-root/var/lib/dnf/history*
FROM ${UBI_MICRO_IMAGE} AS final
COPY --from=build /install-root/ /
COPY --from=build /install-root/ /
RUN git-lfs install --skip-repo \
&& rm -f /var/lib/dnf/history*
Loading