@@ -142,15 +142,15 @@ RUN --mount=type=secret,id=nginx-repo.crt,dst=/etc/ssl/nginx/nginx-repo.crt,mode
142
142
&& microdnf clean all
143
143
144
144
# ############################################ Base image for UBI with NGINX Plus and App Protect WAF/DoS #############################################
145
- FROM redhat/ubi8:8.6 as ubi-plus-nap
145
+ FROM redhat/ubi8 as ubi-plus-nap
146
146
ARG NGINX_PLUS_VERSION
147
147
ARG NAP_MODULES
148
148
149
149
RUN --mount=type=secret,id=nginx-repo.crt,dst=/etc/ssl/nginx/nginx-repo.crt,mode=0644 \
150
150
--mount=type=secret,id=nginx-repo.key,dst=/etc/ssl/nginx/nginx-repo.key,mode=0644 \
151
151
--mount=type=secret,id=rhel_license,dst=/tmp/rhel_license,mode=0644 \
152
152
source /tmp/rhel_license \
153
- # # the code below is duplicated from the ubi-plus image because NAP doesn't support UBI versions newer than 8.6
153
+ # # the code below is duplicated from the ubi-plus image because NAP doesn't support UBI 9 and minimal versions
154
154
dnf --nodocs install -y shadow-utils ca-certificates \
155
155
&& groupadd --system --gid 101 nginx \
156
156
&& useradd --system --gid nginx --no-create-home --home-dir /nonexistent --comment "nginx user" --shell /bin/false --uid 101 nginx \
@@ -159,6 +159,7 @@ RUN --mount=type=secret,id=nginx-repo.crt,dst=/etc/ssl/nginx/nginx-repo.crt,mode
159
159
&& sed -i "0,/centos/s;;${NGINX_PLUS_VERSION}/centos;" /etc/yum.repos.d/nginx-plus.repo \
160
160
&& dnf --nodocs install -y nginx-plus nginx-plus-module-njs \
161
161
# # end of duplicated code
162
+ && sed -i 's/\( def in_container():\) /\1\n return False/g' /usr/lib64/python*/*-packages/rhsm/config.py \
162
163
&& subscription-manager register --org=${RHEL_ORGANIZATION} --activationkey=${RHEL_ACTIVATION_KEY} || true \
163
164
&& subscription-manager attach \
164
165
&& dnf config-manager --set-enabled codeready-builder-for-rhel-8-x86_64-rpms \
@@ -173,8 +174,8 @@ RUN --mount=type=secret,id=nginx-repo.crt,dst=/etc/ssl/nginx/nginx-repo.crt,mode
173
174
sed -i "0,/centos/s;;${NGINX_PLUS_VERSION}/centos;" /etc/yum.repos.d/app-protect-dos-8.repo; \
174
175
dnf --nodocs install -y app-protect-dos; \
175
176
fi \
176
- # fix for CVEs
177
- && dnf --nodocs upgrade -y libcom_err libxml2 krb5-libs dbus expat systemd libtasn1 sqlite-libs libksba platform-python platform-python-setuptools python3-setuptools-wheel tar curl \
177
+ # temp fix for CVE-2023-23916
178
+ && dnf --nodocs upgrade -y curl \
178
179
&& rm /etc/yum.repos.d/app-protect*.repo \
179
180
&& subscription-manager unregister \
180
181
&& dnf clean all && rm -rf /var/cache/dnf
0 commit comments