@@ -163,7 +163,7 @@ RUN --mount=type=bind,from=alpine-fips-3.19,target=/tmp/fips/ \
163
163
&& printf "%s\n " "https://pkgs.nginx.com/app-protect-security-updates/alpine/v$(grep -E -o '^[0-9]+\. [0-9]+' /etc/alpine-release)/main" >> /etc/apk/repositories \
164
164
&& printf "%s\n " "https://${PACKAGE_REPO}/nginx-agent/alpine/v$(grep -E -o '^[0-9]+\. [0-9]+' /etc/alpine-release)/main" >> /etc/apk/repositories \
165
165
&& apk add --no-cache libcap-utils libcurl nginx-plus nginx-plus-module-njs nginx-plus-module-otel nginx-plus-module-fips-check \
166
- && if [ "${NGINX_AGENT}" = "true" ]; then apk add --no-cache nginx-agent; fi \
166
+ && if [ "${NGINX_AGENT}" = "true" ]; then apk add --no-cache " nginx-agent<3" ; fi \
167
167
&& mkdir -p /usr/ssl \
168
168
&& cp -av /tmp/fips/usr/lib/ossl-modules/fips.so /usr/lib/ossl-modules/fips.so \
169
169
&& cp -av /tmp/fips/usr/ssl/fipsmodule.cnf /usr/ssl/fipsmodule.cnf \
@@ -199,7 +199,7 @@ RUN --mount=type=bind,from=alpine-fips-3.19,target=/tmp/fips/ \
199
199
&& printf "%s\n " "https://${PACKAGE_REPO}/app-protect-x-plus/alpine/v$(grep -E -o '^[0-9]+\. [0-9]+' /etc/alpine-release)/main" >> /etc/apk/repositories \
200
200
&& printf "%s\n " "https://${PACKAGE_REPO}/nginx-agent/alpine/v$(grep -E -o '^[0-9]+\. [0-9]+' /etc/alpine-release)/main" >> /etc/apk/repositories \
201
201
&& apk add --no-cache libcap-utils libcurl nginx-plus nginx-plus-module-njs nginx-plus-module-otel nginx-plus-module-fips-check \
202
- && if [ "${NGINX_AGENT}" = "true" ]; then apk add --no-cache nginx-agent; fi \
202
+ && if [ "${NGINX_AGENT}" = "true" ]; then apk add --no-cache " nginx-agent<3" ; fi \
203
203
&& mkdir -p /usr/ssl \
204
204
&& cp -av /tmp/fips/usr/lib/ossl-modules/fips.so /usr/lib/ossl-modules/fips.so \
205
205
&& cp -av /tmp/fips/usr/ssl/fipsmodule.cnf /usr/ssl/fipsmodule.cnf \
@@ -272,7 +272,7 @@ RUN --mount=type=secret,id=nginx-repo.crt,dst=/etc/ssl/nginx/nginx-repo.crt,mode
272
272
cp /tmp/app-protect-dos.sources /etc/apt/sources.list.d/app-protect-dos.sources; \
273
273
fi \
274
274
&& apt-get update \
275
- && if [ "${NGINX_AGENT}" = "true" ]; then apt-get install --no-install-recommends --no-install-suggests -y nginx-agent; fi \
275
+ && if [ "${NGINX_AGENT}" = "true" ]; then apt-get install --no-install-recommends --no-install-suggests -y nginx-agent=2.* ; fi \
276
276
&& if [ -z "${NAP_MODULES##*waf*}" ]; then \
277
277
apt-get install --no-install-recommends --no-install-suggests -y app-protect app-protect-attack-signatures app-protect-threat-campaigns; \
278
278
fi \
@@ -311,7 +311,7 @@ RUN --mount=type=secret,id=nginx-repo.crt,dst=/etc/ssl/nginx/nginx-repo.crt,mode
311
311
cp /tmp/app-protect.sources /etc/apt/sources.list.d/app-protect.sources; \
312
312
fi \
313
313
&& apt-get update \
314
- && if [ "${NGINX_AGENT}" = "true" ]; then apt-get install --no-install-recommends --no-install-suggests -y nginx-agent; fi \
314
+ && if [ "${NGINX_AGENT}" = "true" ]; then apt-get install --no-install-recommends --no-install-suggests -y nginx-agent=2.* ; fi \
315
315
&& if [ -z "${NAP_MODULES##*waf*}" ]; then \
316
316
apt-get install --no-install-recommends --no-install-suggests -y app-protect-module-plus=34+5.342* nginx-plus-module-appprotect=34+5.342* app-protect-plugin=6.12.0*; \
317
317
rm -f /etc/apt/sources.list.d/app-protect.sources; \
@@ -398,7 +398,7 @@ RUN --mount=type=secret,id=nginx-repo.crt,dst=/etc/ssl/nginx/nginx-repo.crt,mode
398
398
&& source /tmp/rhel_license \
399
399
&& rpm -ivh https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm \
400
400
&& microdnf --nodocs install -y ca-certificates shadow-utils subscription-manager \
401
- && if [ "${NGINX_AGENT}" = "true" ]; then microdnf --nodocs install -y nginx-agent; fi \
401
+ && if [ "${NGINX_AGENT}" = "true" ]; then microdnf --nodocs install -y nginx-agent-2.* ; fi \
402
402
&& subscription-manager register --org=${RHEL_ORGANIZATION} --activationkey=${RHEL_ACTIVATION_KEY} || true \
403
403
&& subscription-manager attach \
404
404
&& rpm --import /tmp/app-protect-security-updates.key \
@@ -439,7 +439,7 @@ RUN --mount=type=secret,id=nginx-repo.crt,dst=/etc/ssl/nginx/nginx-repo.crt,mode
439
439
&& source /tmp/rhel_license \
440
440
&& rpm -ivh https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm \
441
441
&& microdnf --nodocs install -y ca-certificates shadow-utils subscription-manager \
442
- && if [ "${NGINX_AGENT}" = "true" ]; then microdnf --nodocs install -y nginx-agent; fi \
442
+ && if [ "${NGINX_AGENT}" = "true" ]; then microdnf --nodocs install -y nginx-agent-2.* ; fi \
443
443
&& if [ -z "${NAP_MODULES##*waf*}" ]; then \
444
444
cp /tmp/app-protect-9.repo /etc/yum.repos.d/app-protect-9.repo \
445
445
&& microdnf --nodocs install -y app-protect-module-plus-34+5.342* \
@@ -480,7 +480,7 @@ RUN --mount=type=secret,id=nginx-repo.crt,dst=/etc/ssl/nginx/nginx-repo.crt,mode
480
480
&& useradd --system --gid nginx --no-create-home --home-dir /nonexistent --comment "nginx user" --shell /bin/false --uid 101 nginx \
481
481
&& rpm --import /tmp/nginx_signing.key \
482
482
&& dnf --nodocs install -y nginx-plus nginx-plus-module-njs nginx-plus-module-otel nginx-plus-module-fips-check \
483
- && if [ "${NGINX_AGENT}" = "true" ]; then dnf --nodocs install -y nginx-agent; fi \
483
+ && if [ "${NGINX_AGENT}" = "true" ]; then dnf --nodocs install -y nginx-agent-2.* ; fi \
484
484
&& sed -i 's/\( def in_container():\) /\1\n return False/g' /usr/lib64/python*/*-packages/rhsm/config.py \
485
485
&& subscription-manager register --org=${RHEL_ORGANIZATION} --activationkey=${RHEL_ACTIVATION_KEY} || true \
486
486
&& subscription-manager attach \
@@ -529,7 +529,7 @@ RUN --mount=type=secret,id=nginx-repo.crt,dst=/etc/ssl/nginx/nginx-repo.crt,mode
529
529
&& useradd --system --gid nginx --no-create-home --home-dir /nonexistent --comment "nginx user" --shell /bin/false --uid 101 nginx \
530
530
&& rpm --import /tmp/nginx_signing.key \
531
531
&& dnf --nodocs install -y nginx-plus nginx-plus-module-njs nginx-plus-module-otel nginx-plus-module-fips-check \
532
- && if [ "${NGINX_AGENT}" = "true" ]; then dnf --nodocs install -y nginx-agent; fi \
532
+ && if [ "${NGINX_AGENT}" = "true" ]; then dnf --nodocs install -y nginx-agent-2.* ; fi \
533
533
# # end of duplicated code
534
534
&& sed -i 's/\( def in_container():\) /\1\n return False/g' /usr/lib64/python*/*-packages/rhsm/config.py \
535
535
&& subscription-manager register --org=${RHEL_ORGANIZATION} --activationkey=${RHEL_ACTIVATION_KEY} || true \
0 commit comments