Skip to content

Commit f59f24b

Browse files
authored
Merge branch 'release-3.7' into cherry-pick-release-3.7-9af8ad16ffa4f03ef36d7ea5c495ca488240b775
2 parents f356b84 + fc90ac8 commit f59f24b

File tree

17 files changed

+174
-177
lines changed

17 files changed

+174
-177
lines changed

.github/workflows/build-ubi-dependency.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
branches:
66
- main
77
paths:
8-
- build/dependencies/Dockerfile.ubi-ppc64le
8+
- build/dependencies/Dockerfile.ubi
99
workflow_dispatch:
1010
inputs:
1111
nginx_version:
@@ -58,7 +58,7 @@ jobs:
5858
if [ -n "${{ inputs.nginx_version }}" ]; then
5959
nginx_v=${{ inputs.nginx_version }}
6060
else
61-
nginx_v=$(grep -m1 'FROM nginx:' <build/dependencies/Dockerfile.ubi-ppc64le | cut -d '@' -f1 | awk -F'[: ]' '{print $3}')
61+
nginx_v=$(grep -m1 'FROM nginx:' <build/dependencies/Dockerfile.ubi | cut -d '@' -f1 | awk -F'[: ]' '{print $3}')
6262
fi
6363
target_image=${{ env.IMAGE_NAME }}:nginx-${nginx_v}
6464
if docker manifest inspect ${target_image}; then
@@ -120,7 +120,7 @@ jobs:
120120
- name: Build and push
121121
uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75 # v6.9.0
122122
with:
123-
file: ./build/dependencies/Dockerfile.ubi-ppc64le
123+
file: ./build/dependencies/Dockerfile.ubi
124124
context: "."
125125
pull: true
126126
push: true

.github/workflows/update-docker-sha.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ jobs:
6262
ARGS="--exclude ${{ github.event.inputs.excludes }}"
6363
fi
6464
.github/scripts/docker-updater.sh ./build/Dockerfile $ARGS
65-
.github/scripts/docker-updater.sh ./build/dependencies/Dockerfile.ubi-ppc64le $ARGS
65+
.github/scripts/docker-updater.sh ./build/dependencies/Dockerfile.ubi $ARGS
6666
.github/scripts/docker-updater.sh ./tests/Dockerfile $ARGS
6767
files=$(git diff --name-only)
6868
if [[ $files == *"Dockerfile"* ]]; then

build/Dockerfile

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,17 @@ ARG PACKAGE_REPO=pkgs.nginx.com
1111

1212

1313
############################################# Base images containing libs for Opentracing and FIPS #############################################
14-
FROM ghcr.io/nginxinc/dependencies/nginx-ot:nginx-1.27.2@sha256:022d9c1e36caedfb502d6ac56b6b8e40977be73517f61f1b525686dec147355d AS opentracing-lib
15-
FROM ghcr.io/nginxinc/dependencies/nginx-ot:nginx-1.27.2-alpine@sha256:7379ceee1ffc21669312a3e882ecd504e14a7f30bdc9bcfdc632030ea3777b0a AS alpine-opentracing-lib
16-
FROM ghcr.io/nginxinc/dependencies/nginx-ubi-ppc64le:nginx-1.27.2@sha256:6288dc0ec71dfcacfbe3578bb0731c03e7e012956e5b01393d28650df54d9b9e AS ubi-ppc64le
14+
FROM ghcr.io/nginxinc/dependencies/nginx-ot:nginx-1.27.2@sha256:df0ccc2169b7c0a06d446222d24e97a7d7599b3c4233bfb16fa0de165802ca8d AS opentracing-lib
15+
FROM ghcr.io/nginxinc/dependencies/nginx-ot:nginx-1.27.2-alpine@sha256:69d252cd586ddbdae0e74e326958b5e50c59700341c6673244660256119ab49b AS alpine-opentracing-lib
16+
FROM ghcr.io/nginxinc/dependencies/nginx-ubi-ppc64le:nginx-1.27.2@sha256:4c47c1295b25018342d9f7c8383fd933e73e162a482f2f45a21326f70c6d501d AS ubi-ppc64le
1717
FROM ghcr.io/nginxinc/alpine-fips:0.2.3-alpine3.17@sha256:67b69b49aff96e185be841e2b2ff2d8236551ea5c18002bffa4344798d803fd8 AS alpine-fips-3.17
1818
FROM ghcr.io/nginxinc/alpine-fips:0.2.3-alpine3.20@sha256:4c29e5c50b122354d9d4ba6b97cdf64647468e788b965fc0240ead541653454a AS alpine-fips-3.20
19-
FROM redhat/ubi9-minimal@sha256:c0e70387664f30cd9cf2795b547e4a9a51002c44a4a86aa9335ab030134bf392 AS ubi-minimal
20-
FROM golang:1.23-alpine@sha256:09742590377387b931261cbeb72ce56da1b0d750a27379f7385245b2b058b63a AS golang-builder
19+
FROM redhat/ubi9-minimal@sha256:d85040b6e3ed3628a89683f51a38c709185efc3fb552db2ad1b9180f2a6c38be AS ubi-minimal
20+
FROM golang:1.23-alpine@sha256:c694a4d291a13a9f9d94933395673494fc2cc9d4777b85df3a7e70b3492d3574 AS golang-builder
2121

2222

2323
############################################# Base image for Alpine #############################################
24-
FROM nginx:1.27.2-alpine@sha256:2140dad235c130ac861018a4e13a6bc8aea3a35f3a40e20c1b060d51a7efd250 AS alpine
24+
FROM nginx:1.27.2-alpine@sha256:74175cf34632e88c6cfe206897cbfe2d2fecf9bf033c40e7f9775a3689e8adc7 AS alpine
2525

2626
RUN --mount=type=bind,from=alpine-opentracing-lib,target=/tmp/ot/ \
2727
apk add --no-cache libcap libstdc++ \
@@ -31,7 +31,7 @@ RUN --mount=type=bind,from=alpine-opentracing-lib,target=/tmp/ot/ \
3131

3232

3333
############################################# Base image for Debian #############################################
34-
FROM nginx:1.27.2@sha256:28402db69fec7c17e179ea87882667f1e054391138f77ffaf0c3eb388efc3ffb AS debian
34+
FROM nginx:1.27.2@sha256:bc5eac5eafc581aeda3008b4b1f07ebba230de2f27d47767129a6a905c84f470 AS debian
3535

3636
RUN --mount=type=bind,from=opentracing-lib,target=/tmp/ot/ \
3737
apt-get update \
@@ -102,7 +102,7 @@ USER 101
102102

103103

104104
############################################# Base image for Alpine with NGINX Plus ##############################################
105-
FROM alpine:3.20@sha256:beefdbd8a1da6d2915566fde36db9db0b524eb737fc57cd1367effd16dc0d06d AS alpine-plus
105+
FROM alpine:3.20@sha256:1e42bbe2508154c9126d48c2b8a75420c3544343bf86fd041fb7527e017a4b4a AS alpine-plus
106106
ARG NGINX_PLUS_VERSION
107107
ARG PACKAGE_REPO
108108

@@ -135,7 +135,7 @@ RUN --mount=type=bind,from=alpine-fips-3.20,target=/tmp/fips/ \
135135

136136

137137
############################################# Base image for Alpine with NGINX Plus, App Protect WAF and FIPS #############################################
138-
FROM alpine:3.17@sha256:3451da08fc6ef554a100da3e2df5ac6d598c82f2a774d5f6ed465c3d80cd163a AS alpine-plus-nap-fips
138+
FROM alpine:3.17@sha256:8fc3dacfb6d69da8d44e42390de777e48577085db99aa4e4af35f483eb08b989 AS alpine-plus-nap-fips
139139
ARG NGINX_PLUS_VERSION
140140
ARG NGINX_AGENT
141141
ARG NGINX_PLUS_VERSION
@@ -172,7 +172,7 @@ RUN --mount=type=bind,from=alpine-fips-3.17,target=/tmp/fips/ \
172172

173173

174174
############################################# Base image for Alpine with NGINX Plus, App Protect WAFv5 and FIPS #############################################
175-
FROM alpine:3.17@sha256:3451da08fc6ef554a100da3e2df5ac6d598c82f2a774d5f6ed465c3d80cd163a AS alpine-plus-nap-v5-fips
175+
FROM alpine:3.17@sha256:8fc3dacfb6d69da8d44e42390de777e48577085db99aa4e4af35f483eb08b989 AS alpine-plus-nap-v5-fips
176176
ARG NGINX_PLUS_VERSION
177177
ARG NGINX_AGENT
178178
ARG NGINX_PLUS_VERSION
@@ -207,7 +207,7 @@ RUN --mount=type=bind,from=alpine-fips-3.17,target=/tmp/fips/ \
207207

208208

209209
############################################# Base image for Debian with NGINX Plus #############################################
210-
FROM debian:12-slim@sha256:36e591f228bb9b99348f584e83f16e012c33ba5cad44ef5981a1d7c0a93eca22 AS debian-plus
210+
FROM debian:12-slim@sha256:ca3372ce30b03a591ec573ea975ad8b0ecaf0eb17a354416741f8001bbcae33d AS debian-plus
211211
ARG NGINX_PLUS_VERSION
212212

213213
ENV NGINX_VERSION=${NGINX_PLUS_VERSION}
@@ -300,7 +300,7 @@ RUN --mount=type=secret,id=nginx-repo.crt,dst=/etc/ssl/nginx/nginx-repo.crt,mode
300300
&& apt-get update \
301301
&& if [ "${NGINX_AGENT}" = "true" ]; then apt-get install --no-install-recommends --no-install-suggests -y nginx-agent; fi \
302302
&& if [ -z "${NAP_MODULES##*waf*}" ]; then \
303-
apt-get install --no-install-recommends --no-install-suggests -y app-protect-module-plus=32+5.144*; \
303+
apt-get install --no-install-recommends --no-install-suggests -y app-protect-plugin=6.3.0* app-protect-module-plus=32+5.144* nginx-plus-module-appprotect=32+5.144*; \
304304
rm -f /etc/apt/sources.list.d/app-protect.sources; \
305305
nap-waf.sh; \
306306
fi \
@@ -332,20 +332,20 @@ RUN --mount=type=bind,from=nginx-files,src=nginx_signing.key,target=/tmp/nginx_s
332332
--mount=type=bind,from=nginx-files,src=ubi-clean.sh,target=/usr/local/bin/ubi-clean.sh \
333333
--mount=type=bind,from=ubi-ppc64le,src=/,target=/ubi-bin/ \
334334
ubi-setup.sh; \
335-
if [ $(uname -p) != ppc64le ]; then \
336-
printf "%s\n" "[nginx]" "name=nginx repo" \
337-
"baseurl=https://nginx.org/packages/mainline/centos/9/\$basearch/" \
338-
"gpgcheck=1" "enabled=1" "module_hotfixes=true" > /etc/yum.repos.d/nginx.repo \
339-
&& microdnf --nodocs install -y nginx nginx-module-njs nginx-module-image-filter nginx-module-xslt \
340-
&& rm /etc/yum.repos.d/nginx.repo; \
341-
else \
335+
if [ $(uname -p) = ppc64le ] || [ $(uname -p) = s390x ]; then \
342336
rpm -qa --queryformat "%{NAME}\n" | sort > pkgs-installed \
343337
&& microdnf --nodocs --setopt=install_weak_deps=0 install -y diffutils dnf \
344338
&& rpm -qa --queryformat "%{NAME}\n" | sort > pkgs-new \
345339
&& dnf install -y /ubi-bin/*.rpm \
346340
&& dnf -q repoquery --resolve --requires --recursive --whatrequires nginx --queryformat "%{NAME}" > pkgs-nginx \
347341
&& dnf --setopt=protected_packages= remove -y $(comm -13 pkgs-installed pkgs-new | comm -13 pkgs-nginx -) \
348342
&& rm pkgs-installed pkgs-new pkgs-nginx; \
343+
else \
344+
printf "%s\n" "[nginx]" "name=nginx repo" \
345+
"baseurl=https://nginx.org/packages/mainline/centos/9/\$basearch/" \
346+
"gpgcheck=1" "enabled=1" "module_hotfixes=true" > /etc/yum.repos.d/nginx.repo \
347+
&& microdnf --nodocs install -y nginx nginx-module-njs nginx-module-image-filter nginx-module-xslt \
348+
&& rm /etc/yum.repos.d/nginx.repo; \
349349
fi \
350350
&& ubi-clean.sh
351351

@@ -439,7 +439,7 @@ RUN --mount=type=secret,id=nginx-repo.crt,dst=/etc/ssl/nginx/nginx-repo.crt,mode
439439

440440

441441
############################################# Base image for UBI8 with NGINX Plus and App Protect WAF #############################################
442-
FROM redhat/ubi8@sha256:8990388831e1b41c9a67389e4b691dae8b1283f77d5fb7263e1f4fc69c0a9d05 AS ubi-8-plus-nap
442+
FROM redhat/ubi8@sha256:d497966ce214138de5271eef321680639e18daf105ae94a6bff54247d8a191a3 AS ubi-8-plus-nap
443443
ARG NAP_MODULES
444444
ARG NGINX_AGENT
445445
ARG NGINX_PLUS_VERSION
@@ -484,7 +484,7 @@ RUN --mount=type=secret,id=nginx-repo.crt,dst=/etc/ssl/nginx/nginx-repo.crt,mode
484484

485485

486486
############################################# Base image for UBI8 with NGINX Plus and App Protect WAFv5 #############################################
487-
FROM redhat/ubi8@sha256:8990388831e1b41c9a67389e4b691dae8b1283f77d5fb7263e1f4fc69c0a9d05 AS ubi-8-plus-nap-v5
487+
FROM redhat/ubi8@sha256:d497966ce214138de5271eef321680639e18daf105ae94a6bff54247d8a191a3 AS ubi-8-plus-nap-v5
488488
ARG NAP_MODULES
489489
ARG NGINX_AGENT
490490
ARG NGINX_PLUS_VERSION
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# syntax=docker/dockerfile:1.8
2-
FROM nginx:1.27.1@sha256:287ff321f9e3cde74b600cc26197424404157a72043226cbbf07ee8304a2c720 AS nginx
2+
FROM nginx:1.27.2@sha256:bc5eac5eafc581aeda3008b4b1f07ebba230de2f27d47767129a6a905c84f470 AS nginx
33

44
FROM redhat/ubi9:9.4@sha256:ee0b908e958a1822afc57e5d386d1ea128eebe492cb2e01b6903ee19c133ea75 AS rpm-build
55
ARG NGINX
@@ -10,7 +10,8 @@ ENV NJS_VERSION ${NJS}
1010

1111
RUN mkdir -p /nginx/; \
1212
# only build for ppc64le but make multiarch image for mounting
13-
[ $(uname -p) != ppc64le ] && exit 0; \
13+
[ $(uname -p) = x86_64 ] && exit 0; \
14+
[ $(uname -p) = aarch64 ] && exit 0; \
1415
rpm --import https://nginx.org/keys/nginx_signing.key \
1516
&& MINOR_VERSION=$(echo ${NGINX_VERSION} | cut -d '.' -f 2) \
1617
&& if [ $(( $MINOR_VERSION % 2)) -eq 0 ]; then echo mainline=""; else mainline="mainline/"; fi \

0 commit comments

Comments
 (0)