Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 19 additions & 4 deletions .konflux/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,32 @@ WORKDIR app
COPY . .

RUN subscription-manager register --org $(cat "/activation-key/org") --activationkey $(cat "/activation-key/activationkey") \
&& subscription-manager repos --disable=*eus*
&& subscription-manager refresh \
&& subscription-manager repos --disable=* \
--enable=rhel-9-for-x86_64-baseos-rpms \
--enable=rhel-9-for-x86_64-appstream-rpms \
--enable=codeready-builder-for-rhel-9-x86_64-rpms

RUN PKGS="rust-toolset protobuf-compiler" \
&& dnf install -y $PKGS \
&& dnf clean all
&& dnf clean all \
&& subscription-manager unregister

RUN cargo build --release --bin recert

# runtime stage
FROM registry.redhat.io/rhel9-4-els/rhel-minimal:9.4-149 AS runtime-image

RUN microdnf install -y 'openssh-clients' \
&& microdnf clean all
RUN microdnf install -y 'subscription-manager' \
&& subscription-manager register --org $(cat "/activation-key/org") --activationkey $(cat "/activation-key/activationkey") \
&& subscription-manager refresh \
&& subscription-manager repos --disable=* \
--enable=rhel-9-for-x86_64-baseos-rpms

RUN PKGS="openssh-clients" \
&& microdnf install -y $PKGS \
&& microdnf clean all \
&& subscription-manager unregister

WORKDIR app
COPY --from=build-image /app/target/release/recert /usr/local/bin
Expand Down
Loading