Skip to content

Commit d26e736

Browse files
authored
Merge branch 'feat/pipeline-ubi-builds' into feat/pipeline-openshift-operator
2 parents ffe3cfb + 9f36704 commit d26e736

File tree

2 files changed

+15
-11
lines changed

2 files changed

+15
-11
lines changed

build/ubi/Dockerfile.nginx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ ADD --link --chown=101:1001 build/ubi/repos/agent.repo agent.repo
88

99
FROM ghcr.io/nginx/dependencies/nginx-ubi:ubi9@sha256:01a32246761b9bbe47a6a29bcd8ca6e9b6e331b3bdfa372d8987b622276f7025 AS ubi9-packages
1010

11-
FROM redhat/ubi9:9.6 AS ubi-nginx
11+
FROM redhat/ubi9-minimal:9.6 AS ubi-nginx
1212

1313
# renovate: datasource=github-tags depName=nginx/agent
1414
ARG NGINX_AGENT_VERSION=v3.3.1
@@ -36,15 +36,17 @@ RUN --mount=type=bind,from=nginx-files,src=nginx_signing.key,target=/tmp/nginx_s
3636
rpm --import /tmp/nginx_signing.key \
3737
# Install c-ares from the dependencies image (contains required libs)
3838
&& rpm -Uvh /ubi-bin/c-ares-*.rpm \
39+
&& microdnf --nodocs install -y pcre pcre2 \
40+
&& microdnf --nodocs install -y procps-ng iproute iputils which \
3941
# Create nginx user with consistent UID/GID
4042
&& groupadd -g 1001 nginx \
4143
&& useradd -r -u 101 -g nginx -s /sbin/nologin -d /var/cache/nginx nginx \
4244
# Install NGINX and modules including OTEL
43-
&& dnf --nodocs install -y nginx nginx-module-njs nginx-module-otel \
45+
&& microdnf --nodocs install -y nginx nginx-module-njs nginx-module-otel \
4446
# Install nginx-agent
45-
&& dnf --nodocs install -y nginx-agent-${NGINX_AGENT_VERSION#v}* \
47+
&& microdnf --nodocs install -y nginx-agent-${NGINX_AGENT_VERSION#v}* \
4648
# Clean up (only remove what we can)
47-
&& dnf clean all \
49+
&& microdnf clean all \
4850
&& rm -rf /var/cache/yum
4951

5052
# Configure directories and logging

build/ubi/Dockerfile.nginxplus

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ ADD --link --chown=101:1001 build/ubi/repos/agent.repo agent.repo
88

99
FROM 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

1313
ARG 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

Comments
 (0)