@@ -7,6 +7,7 @@ ARG NAP_WAF_VERSION=35+5.527
7
7
ARG NAP_WAF_COMMON_VERSION=11.559
8
8
ARG NAP_WAF_PLUGIN_VERSION=6.23.0
9
9
ARG NGINX_AGENT_VERSION=3.3
10
+ ARG NAP_AGENT_VERSION=2
10
11
ARG DOWNLOAD_TAG=edge
11
12
ARG DEBIAN_FRONTEND=noninteractive
12
13
ARG PREBUILT_BASE_IMG=nginx/nginx-ingress:${DOWNLOAD_TAG}
@@ -216,6 +217,7 @@ FROM alpine:3.19@sha256:6baf43584bcb78f2e5847d1de515f23499913ac9f12bdf834811a314
216
217
ARG NGINX_PLUS_VERSION
217
218
ARG NAP_WAF_VERSION
218
219
ARG PACKAGE_REPO
220
+ ARG NAP_AGENT_VERSION
219
221
220
222
ENV NGINX_VERSION=${NGINX_PLUS_VERSION}
221
223
@@ -232,7 +234,7 @@ RUN --mount=type=bind,from=alpine-fips-3.19,target=/tmp/fips/ \
232
234
&& 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 \
233
235
&& printf "%s\n " "https://${PACKAGE_REPO}/nginx-agent/alpine/v$(grep -E -o '^[0-9]+\. [0-9]+' /etc/alpine-release)/main" >> /etc/apk/repositories \
234
236
&& apk add --no-cache libcap-utils libcurl nginx-plus nginx-plus-module-njs nginx-plus-module-otel nginx-plus-module-fips-check \
235
- && apk add --no-cache nginx-agent~2 \
237
+ && apk add --no-cache nginx-agent~${NAP_AGENT_VERSION} \
236
238
&& mkdir -p /usr/ssl \
237
239
&& cp -av /tmp/fips/usr/lib/ossl-modules/fips.so /usr/lib/ossl-modules/fips.so \
238
240
&& cp -av /tmp/fips/usr/ssl/fipsmodule.cnf /usr/ssl/fipsmodule.cnf \
@@ -248,8 +250,9 @@ RUN --mount=type=bind,from=alpine-fips-3.19,target=/tmp/fips/ \
248
250
# ############################################ Base image for Alpine with NGINX Plus, App Protect WAFv5 and FIPS #############################################
249
251
FROM alpine:3.19@sha256:6baf43584bcb78f2e5847d1de515f23499913ac9f12bdf834811a3145eb11ca1 AS alpine-plus-nap-v5-fips
250
252
ARG NGINX_PLUS_VERSION
251
- ARG NAP_WAF_VERSION
252
253
ARG PACKAGE_REPO
254
+ ARG NAP_WAF_VERSION
255
+ ARG NAP_AGENT_VERSION
253
256
254
257
ENV NGINX_VERSION=${NGINX_PLUS_VERSION}
255
258
@@ -264,7 +267,7 @@ RUN --mount=type=bind,from=alpine-fips-3.19,target=/tmp/fips/ \
264
267
&& 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 \
265
268
&& printf "%s\n " "https://${PACKAGE_REPO}/nginx-agent/alpine/v$(grep -E -o '^[0-9]+\. [0-9]+' /etc/alpine-release)/main" >> /etc/apk/repositories \
266
269
&& apk add --no-cache libcap-utils libcurl nginx-plus nginx-plus-module-njs nginx-plus-module-otel nginx-plus-module-fips-check \
267
- && apk add --no-cache nginx-agent~2 \
270
+ && apk add --no-cache nginx-agent~${NAP_AGENT_VERSION} \
268
271
&& mkdir -p /usr/ssl \
269
272
&& cp -av /tmp/fips/usr/lib/ossl-modules/fips.so /usr/lib/ossl-modules/fips.so \
270
273
&& cp -av /tmp/fips/usr/ssl/fipsmodule.cnf /usr/ssl/fipsmodule.cnf \
@@ -333,6 +336,7 @@ ARG NGINX_PLUS_VERSION
333
336
ARG NAP_WAF_VERSION
334
337
ARG NAP_WAF_COMMON_VERSION
335
338
ARG NAP_WAF_PLUGIN_VERSION
339
+ ARG NAP_AGENT_VERSION
336
340
337
341
ENV NGINX_VERSION=${NGINX_PLUS_VERSION}
338
342
@@ -357,7 +361,7 @@ RUN --mount=type=secret,id=nginx-repo.crt,dst=/etc/ssl/nginx/nginx-repo.crt,mode
357
361
app-protect-plugin=${NAP_WAF_PLUGIN_VERSION}* \
358
362
app-protect-attack-signatures \
359
363
app-protect-threat-campaigns \
360
- nginx-agent=2 .* \
364
+ nginx-agent=${NAP_AGENT_VERSION} .* \
361
365
&& rm -f /etc/apt/sources.list.d/app-protect.sources /etc/apt/sources.list.d/nginx-agent.sources \
362
366
&& nap-waf.sh \
363
367
&& agent.sh; \
@@ -376,6 +380,7 @@ FROM debian-plus-only AS debian-plus-nap-v5
376
380
ARG NGINX_PLUS_VERSION
377
381
ARG NAP_WAF_VERSION
378
382
ARG NAP_WAF_PLUGIN_VERSION
383
+ ARG NAP_AGENT_VERSION
379
384
380
385
ENV NGINX_VERSION=${NGINX_PLUS_VERSION}
381
386
@@ -387,7 +392,7 @@ RUN --mount=type=secret,id=nginx-repo.crt,dst=/etc/ssl/nginx/nginx-repo.crt,mode
387
392
--mount=type=bind,from=nginx-files,src=nap-waf.sh,target=/usr/local/bin/nap-waf.sh \
388
393
--mount=type=bind,from=nginx-files,src=debian-agent-12.sources,target=/etc/apt/sources.list.d/nginx-agent.sources \
389
394
apt-get update \
390
- && apt-get install --no-install-recommends --no-install-suggests -y nginx-agent=2 .* app-protect-module-plus=${NAP_WAF_VERSION}* nginx-plus-module-appprotect=${NAP_WAF_VERSION}* app-protect-plugin=${NAP_WAF_PLUGIN_VERSION}* \
395
+ && apt-get install --no-install-recommends --no-install-suggests -y nginx-agent=${NAP_AGENT_VERSION} .* app-protect-module-plus=${NAP_WAF_VERSION}* nginx-plus-module-appprotect=${NAP_WAF_VERSION}* app-protect-plugin=${NAP_WAF_PLUGIN_VERSION}* \
391
396
&& nap-waf.sh \
392
397
&& agent.sh
393
398
@@ -413,7 +418,7 @@ RUN --mount=type=secret,id=nginx-repo.crt,dst=/etc/ssl/nginx/nginx-repo.crt,mode
413
418
mkdir -p /etc/nginx/reporting/ && cp -av /tmp/nginx/reporting/tracking.info /etc/nginx/reporting/tracking.info \
414
419
&& ubi-setup.sh \
415
420
&& rpm -Uvh /ubi-bin/c-ares-*.rpm \
416
- && microdnf --nodocs install -y nginx-plus nginx-plus-module-njs nginx-plus-module-otel nginx-plus-module-fips-check nginx-agent-${NGINX_AGENT_VERSION}* \
421
+ && microdnf --nodocs install -y nginx-plus nginx-plus-module-njs nginx-plus-module-otel nginx-plus-module-fips-check nginx-agent-${NGINX_AGENT_VERSION}. * \
417
422
&& agent.sh \
418
423
&& ubi-clean.sh
419
424
@@ -424,6 +429,7 @@ ARG NAP_MODULES
424
429
ARG BUILD_OS
425
430
ARG NGINX_PLUS_VERSION
426
431
ARG NAP_WAF_VERSION
432
+ ARG NAP_AGENT_VERSION
427
433
428
434
ENV NGINX_VERSION=${NGINX_PLUS_VERSION}
429
435
@@ -446,7 +452,7 @@ RUN --mount=type=secret,id=nginx-repo.crt,dst=/etc/ssl/nginx/nginx-repo.crt,mode
446
452
mkdir -p /etc/nginx/reporting/ && cp -av /tmp/nginx/reporting/tracking.info /etc/nginx/reporting/tracking.info \
447
453
&& ubi-setup.sh \
448
454
&& rpm -Uvh /ubi-bin/c-ares-*.rpm \
449
- && microdnf --nodocs install -y nginx-plus nginx-plus-module-njs nginx-plus-module-fips-check nginx-plus-module-otel nginx-agent-2 .* \
455
+ && microdnf --nodocs install -y nginx-plus nginx-plus-module-njs nginx-plus-module-fips-check nginx-plus-module-otel nginx-agent-${NAP_AGENT_VERSION} .* \
450
456
&& source /tmp/rhel_license \
451
457
&& microdnf --nodocs install -y ca-certificates shadow-utils subscription-manager \
452
458
&& rpm -ivh https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm \
@@ -475,6 +481,7 @@ RUN --mount=type=secret,id=nginx-repo.crt,dst=/etc/ssl/nginx/nginx-repo.crt,mode
475
481
FROM ubi-minimal AS ubi-9-plus-nap-v5
476
482
ARG NGINX_PLUS_VERSION
477
483
ARG NAP_WAF_VERSION
484
+ ARG NAP_AGENT_VERSION
478
485
479
486
ENV NGINX_VERSION=${NGINX_PLUS_VERSION}
480
487
@@ -498,7 +505,7 @@ RUN --mount=type=secret,id=nginx-repo.crt,dst=/etc/ssl/nginx/nginx-repo.crt,mode
498
505
&& rpm -ivh https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm \
499
506
&& rpm -Uvh /ubi-bin/c-ares-*.rpm \
500
507
&& microdnf --nodocs install -y ca-certificates shadow-utils subscription-manager \
501
- && microdnf --nodocs install -y nginx-plus-module-otel nginx-agent-2 .* app-protect-module-plus-${NAP_WAF_VERSION}* \
508
+ && microdnf --nodocs install -y nginx-plus-module-otel nginx-agent-${NAP_AGENT_VERSION} .* app-protect-module-plus-${NAP_WAF_VERSION}* \
502
509
&& nap-waf.sh \
503
510
&& ubi-clean.sh \
504
511
&& agent.sh
@@ -509,6 +516,7 @@ FROM redhat/ubi8@sha256:2f698e145dd30ac9f611b8984b910640bc210fae476dc36aa9ba200f
509
516
ARG NGINX_PLUS_VERSION
510
517
ARG NAP_WAF_VERSION
511
518
ARG BUILD_OS
519
+ ARG NAP_AGENT_VERSION
512
520
513
521
ENV NGINX_VERSION=${NGINX_PLUS_VERSION}
514
522
@@ -531,7 +539,7 @@ RUN --mount=type=secret,id=nginx-repo.crt,dst=/etc/ssl/nginx/nginx-repo.crt,mode
531
539
&& rpm --import /tmp/nginx_signing.key \
532
540
&& rpm --import /tmp/app-protect-security-updates.key \
533
541
&& rpm -Uvh /ubi-bin/c-ares-*.rpm \
534
- && dnf --nodocs install -y nginx-plus nginx-plus-module-njs nginx-plus-module-otel nginx-plus-module-fips-check nginx-agent-2 .* \
542
+ && dnf --nodocs install -y nginx-plus nginx-plus-module-njs nginx-plus-module-otel nginx-plus-module-fips-check nginx-agent-${NAP_AGENT_VERSION} .* \
535
543
&& sed -i 's/\( def in_container():\) /\1\n return False/g' /usr/lib64/python*/*-packages/rhsm/config.py \
536
544
&& subscription-manager register --org=${RHEL_ORGANIZATION} --activationkey=${RHEL_ACTIVATION_KEY} --name ${BUILD_OS}-$(uname -m) || true \
537
545
&& subscription-manager attach \
@@ -548,6 +556,7 @@ RUN --mount=type=secret,id=nginx-repo.crt,dst=/etc/ssl/nginx/nginx-repo.crt,mode
548
556
FROM redhat/ubi8@sha256:2f698e145dd30ac9f611b8984b910640bc210fae476dc36aa9ba200fad2a30ed AS ubi-8-plus-nap-v5
549
557
ARG NGINX_PLUS_VERSION
550
558
ARG NAP_WAF_VERSION
559
+ ARG NAP_AGENT_VERSION
551
560
552
561
ENV NGINX_VERSION=${NGINX_PLUS_VERSION}
553
562
@@ -569,7 +578,7 @@ RUN --mount=type=secret,id=nginx-repo.crt,dst=/etc/ssl/nginx/nginx-repo.crt,mode
569
578
&& useradd --system --gid nginx --no-create-home --home-dir /nonexistent --comment "nginx user" --shell /bin/false --uid 101 nginx \
570
579
&& rpm --import /tmp/nginx_signing.key \
571
580
&& rpm -Uvh /ubi-bin/c-ares-*.rpm \
572
- && dnf --nodocs install -y nginx-plus nginx-plus-module-njs nginx-plus-module-otel nginx-plus-module-fips-check nginx-agent-2 .* \
581
+ && dnf --nodocs install -y nginx-plus nginx-plus-module-njs nginx-plus-module-otel nginx-plus-module-fips-check nginx-agent-${NAP_AGENT_VERSION} .* \
573
582
&& dnf --nodocs install -y app-protect-module-plus-${NAP_WAF_VERSION}* \
574
583
&& nap-waf.sh \
575
584
&& agent.sh \
0 commit comments