@@ -4,17 +4,32 @@ WORKDIR app
4
4
COPY . .
5
5
6
6
RUN subscription-manager register --org $(cat "/activation-key/org" ) --activationkey $(cat "/activation-key/activationkey" ) \
7
- && subscription-manager repos --disable=*eus*
7
+ && subscription-manager refresh \
8
+ && subscription-manager repos --disable=* \
9
+ --enable=rhel-9-for-x86_64-baseos-rpms \
10
+ --enable=rhel-9-for-x86_64-appstream-rpms \
11
+ --enable=codeready-builder-for-rhel-9-x86_64-rpms
12
+
8
13
RUN PKGS="rust-toolset protobuf-compiler" \
9
14
&& dnf install -y $PKGS \
10
- && dnf clean all
15
+ && dnf clean all \
16
+ && subscription-manager unregister
17
+
11
18
RUN cargo build --release --bin recert
12
19
13
20
# runtime stage
14
21
FROM registry.redhat.io/rhel9-4-els/rhel-minimal:9.4-149 AS runtime-image
15
22
16
- RUN microdnf install -y 'openssh-clients' \
17
- && microdnf clean all
23
+ RUN microdnf install -y 'subscription-manager' \
24
+ && subscription-manager register --org $(cat "/activation-key/org" ) --activationkey $(cat "/activation-key/activationkey" ) \
25
+ && subscription-manager refresh \
26
+ && subscription-manager repos --disable=* \
27
+ --enable=rhel-9-for-x86_64-baseos-rpms
28
+
29
+ RUN PKGS="openssh-clients" \
30
+ && microdnf install -y $PKGS \
31
+ && microdnf clean all \
32
+ && subscription-manager unregister
18
33
19
34
WORKDIR app
20
35
COPY --from=build-image /app/target/release/recert /usr/local/bin
0 commit comments