@@ -8,7 +8,7 @@ ADD --link --chown=101:1001 build/ubi/repos/agent.repo agent.repo
88
99FROM ghcr.io/nginx/dependencies/nginx-ubi:ubi9@sha256:01a32246761b9bbe47a6a29bcd8ca6e9b6e331b3bdfa372d8987b622276f7025 AS ubi9-packages
1010
11- FROM redhat/ubi9:9.6 AS ubi-nginx-plus
11+ FROM redhat/ubi9-minimal :9.6 AS ubi-nginx-plus
1212
1313ARG NGINX_PLUS_VERSION=R35
1414
@@ -37,21 +37,23 @@ RUN --mount=type=bind,from=nginx-files,src=nginx-plus.repo,target=/etc/yum.repos
3737 --mount=type=secret,id=nginx-repo.crt,dst=/etc/ssl/nginx/nginx-repo.crt,mode=0644 \
3838 --mount=type=secret,id=nginx-repo.key,dst=/etc/ssl/nginx/nginx-repo.key,mode=0644 \
3939 # Install shadow-utils for useradd and subscription-manager for repo access
40- dnf --nodocs install -y shadow-utils subscription-manager \
40+ microdnf --nodocs install -y shadow-utils subscription-manager \
41+ && microdnf --nodocs install -y pcre pcre2 \
42+ && microdnf --nodocs install -y procps-ng iproute iputils which \
4143 && rpm --import /tmp/nginx_signing.key \
4244 # Install c-ares from the dependencies image (contains required libs)
4345 && rpm -Uvh /ubi-bin/c-ares-*.rpm \
4446 # Create nginx user with consistent UID/GID
4547 && groupadd -g 1001 nginx \
4648 && useradd -r -u 101 -g nginx -s /sbin/nologin -d /var/cache/nginx nginx \
4749 # Install NGINX Plus and modules (njs, otel)
48- && dnf --nodocs install -y nginx-plus-${NGINX_PLUS_VERSION,,} \
49- && dnf --nodocs install -y nginx-plus-module-njs-${NGINX_PLUS_VERSION,,} nginx-plus-module-otel-${NGINX_PLUS_VERSION,,} \
50+ && microdnf --nodocs install -y nginx-plus-${NGINX_PLUS_VERSION,,} \
51+ && microdnf --nodocs install -y nginx-plus-module-njs-${NGINX_PLUS_VERSION,,} nginx-plus-module-otel-${NGINX_PLUS_VERSION,,} \
5052 # Install nginx-agent
51- && dnf --nodocs install -y nginx-agent-${NGINX_AGENT_VERSION#v}* \
53+ && microdnf --nodocs install -y nginx-agent-${NGINX_AGENT_VERSION#v}* \
5254 # Clean up
53- && dnf remove -y shadow-utils subscription-manager \
54- && dnf clean all \
55+ && microdnf remove -y shadow-utils subscription-manager \
56+ && microdnf clean all \
5557 && rm -rf /var/cache/yum
5658
5759# Configure directories and logging
0 commit comments