Installing wg-quick inside Keycloak (UBI9) container

84 Views Asked by At

I would like to use Keycloak's test container, but need to additionally install wg-quick inside the container. Keycloak's docs suggest using some extra incantation in the Dockerfile to do so:

FROM registry.access.redhat.com/ubi9 AS ubi-micro-build
RUN mkdir -p /mnt/rootfs
RUN dnf install --installroot /mnt/rootfs wireguard-tools --releasever 9 --setopt install_weak_deps=false --nodocs -y; dnf --installroot /mnt/rootfs clean all --releasever 9

FROM quay.io/keycloak/keycloak
COPY --from=ubi-micro-build /mnt/rootfs /

When doing so, I see this in the log:

Updating Subscription Management repositories.
Unable to read consumer identity
Subscription Manager is operating in container mode.

This system is not registered with an entitlement server. You can use subscription-manager to register.

Red Hat Universal Base Image 9 (RPMs) - BaseOS  2.4 MB/s | 509 kB     00:00    
Red Hat Universal Base Image 9 (RPMs) - AppStre 5.8 MB/s | 1.7 MB     00:00    
Red Hat Universal Base Image 9 (RPMs) - CodeRea 978 kB/s | 198 kB     00:00    
No match for argument: wireguard-tools
Error: Unable to find a match: wireguard-tools

I am not a regular RedHat user. What does this mean? Do I need subscription? Or is the package simply unavailable in UBI9 repos? What would be the workaround then?

0

There are 0 best solutions below