Skip to content

Commit 58bc283

Browse files
pdabelf5oseoin
andauthored
[cherry-pick] nginx 1.27.1 dependencies (#6226)
Co-authored-by: oseoin <[email protected]>
1 parent 66f6f73 commit 58bc283

File tree

5 files changed

+69
-29
lines changed

5 files changed

+69
-29
lines changed

build/Dockerfile

Lines changed: 49 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,17 @@ ARG WAF_VERSION=v4
1010

1111

1212
############################################# Base images containing libs for Opentracing and FIPS #############################################
13-
FROM ghcr.io/nginxinc/dependencies/nginx-ot:nginx-1.27.0@sha256:ae23c9404255938311d526fa70122beedfa60b59f44c8353c685fa9b59f13b69 AS opentracing-lib
14-
FROM ghcr.io/nginxinc/dependencies/nginx-ot:nginx-1.27.0-alpine@sha256:7c04bb8065fdaa69ade0c9d12ede21ddc661cfaf87e32baa922ac1ebf3e8b8e7 AS alpine-opentracing-lib
13+
FROM ghcr.io/nginxinc/dependencies/nginx-ot:nginx-1.27.1@sha256:68d5e10f4aeca7fcd4ceea163f57c6d43a7de8c83bfd75436ab07cf6073df886 AS opentracing-lib
14+
FROM ghcr.io/nginxinc/dependencies/nginx-ot:nginx-1.27.1-alpine@sha256:e78f115f9031f2dd5b1d93ec67174d7e37b4d5a4e225657a04622df443db6d38 AS alpine-opentracing-lib
15+
FROM ghcr.io/nginxinc/dependencies/nginx-ubi-ppc64le:nginx-1.27.1@sha256:0bab61e2bd639b269ec54343ea66b7acbdb0eb67bed44383e1be937c483c451d AS ubi-ppc64le
1516
FROM ghcr.io/nginxinc/alpine-fips:0.1.0-alpine3.17@sha256:f00b3f266422feaaac7b733b46903bd19eb1cd1caa6991131576f5f767db76f8 AS alpine-fips-3.17
1617
FROM ghcr.io/nginxinc/alpine-fips:0.2.0-alpine3.19@sha256:1744ae3a8e795daf771f3f7df33b83160981545abb1f1597338e2769d06aa1cc AS alpine-fips-3.19
1718
FROM redhat/ubi9-minimal@sha256:104cf11d890aeb7dd5728b7d7732e175a0e4018f1bb00d2faebcc8f6bf29bd52 AS ubi-minimal
1819
FROM golang:1.22-alpine@sha256:1a478681b671001b7f029f94b5016aed984a23ad99c707f6a0ab6563860ae2f3 AS golang-builder
1920

2021

2122
############################################# Base image for Alpine #############################################
22-
FROM nginx:1.27.0-alpine@sha256:208b70eefac13ee9be00e486f79c695b15cef861c680527171a27d253d834be9 AS alpine
23+
FROM nginx:1.27.1-alpine@sha256:c04c18adc2a407740a397c8407c011fc6c90026a9b65cceddef7ae5484360158 AS alpine
2324

2425
RUN --mount=type=bind,from=alpine-opentracing-lib,target=/tmp/ot/ \
2526
apk add --no-cache libcap libstdc++ \
@@ -29,7 +30,7 @@ RUN --mount=type=bind,from=alpine-opentracing-lib,target=/tmp/ot/ \
2930

3031

3132
############################################# Base image for Debian #############################################
32-
FROM nginx:1.27.0@sha256:98f8ec75657d21b924fe4f69b6b9bff2f6550ea48838af479d8894a852000e40 AS debian
33+
FROM nginx:1.27.1@sha256:1540e37eebb9abc5afa4256de1bade6542d50bf69b61b1dd855cb7804aaaf444 AS debian
3334

3435
RUN --mount=type=bind,from=opentracing-lib,target=/tmp/ot/ \
3536
apt-get update \
@@ -39,25 +40,8 @@ RUN --mount=type=bind,from=opentracing-lib,target=/tmp/ot/ \
3940
&& ldconfig
4041

4142

42-
############################################# Base image for UBI #############################################
43-
FROM nginxcontrib/nginx:1.27.0-ubi@sha256:1a077f6c3027d13404cc51b806b3308fe93dea63c1f42fec6885f5f509444e54 AS ubi
44-
ARG IC_VERSION
45-
46-
LABEL name="NGINX Ingress Controller" \
47-
maintainer="[email protected]" \
48-
vendor="NGINX Inc" \
49-
version="${IC_VERSION}" \
50-
release="1" \
51-
summary="The Ingress Controller is an application that runs in a cluster and configures an HTTP load balancer according to Ingress resources." \
52-
description="The Ingress Controller is an application that runs in a cluster and configures an HTTP load balancer according to Ingress resources." \
53-
io.k8s.description="NGINX Ingress Controller is an application that runs in a cluster and configures an HTTP load balancer according to Ingress resources." \
54-
io.openshift.tags="nginx,ingress-controller,ingress,controller,kubernetes,openshift"
55-
56-
COPY --link --chown=101:0 LICENSE /licenses/
57-
58-
59-
############################################# NGINX files for NGINX Plus #############################################
60-
FROM scratch as nginx-files
43+
############################################# NGINX files #############################################
44+
FROM scratch AS nginx-files
6145
ARG IC_VERSION
6246
ARG BUILD_OS
6347
ARG NGINX_PLUS_VERSION
@@ -94,6 +78,8 @@ ADD --link --chown=101:0 --chmod=0755 build/scripts/common.sh common.sh
9478
ADD --link --chown=101:0 --chmod=0755 build/scripts/nap-waf.sh nap-waf.sh
9579
ADD --link --chown=101:0 --chmod=0755 build/scripts/nap-dos.sh nap-dos.sh
9680
ADD --link --chown=101:0 --chmod=0755 build/scripts/agent.sh agent.sh
81+
ADD --link --chown=101:0 --chmod=0755 build/scripts/ubi-setup.sh ubi-setup.sh
82+
ADD --link --chown=101:0 --chmod=0755 build/scripts/ubi-clean.sh ubi-clean.sh
9783

9884

9985
############################################# Patch Image #############################################
@@ -317,6 +303,46 @@ RUN --mount=type=secret,id=nginx-repo.crt,dst=/etc/ssl/nginx/nginx-repo.crt,mode
317303
fi
318304

319305

306+
############################################# Base image for UBI #############################################
307+
FROM ubi-minimal AS ubi
308+
ARG IC_VERSION
309+
310+
LABEL name="NGINX Ingress Controller" \
311+
maintainer="[email protected]" \
312+
vendor="NGINX Inc" \
313+
version="${IC_VERSION}" \
314+
release="1" \
315+
summary="The Ingress Controller is an application that runs in a cluster and configures an HTTP load balancer according to Ingress resources." \
316+
description="The Ingress Controller is an application that runs in a cluster and configures an HTTP load balancer according to Ingress resources." \
317+
io.k8s.description="NGINX Ingress Controller is an application that runs in a cluster and configures an HTTP load balancer according to Ingress resources." \
318+
io.openshift.tags="nginx,ingress-controller,ingress,controller,kubernetes,openshift"
319+
320+
COPY --link --chown=101:0 LICENSE /licenses/
321+
322+
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
323+
RUN --mount=type=bind,from=nginx-files,src=nginx_signing.key,target=/tmp/nginx_signing.key \
324+
--mount=type=bind,from=nginx-files,src=ubi-setup.sh,target=/usr/local/bin/ubi-setup.sh \
325+
--mount=type=bind,from=nginx-files,src=ubi-clean.sh,target=/usr/local/bin/ubi-clean.sh \
326+
--mount=type=bind,from=ubi-ppc64le,src=/,target=/ubi-bin/ \
327+
ubi-setup.sh; \
328+
if [ $(uname -p) != ppc64le ]; then \
329+
printf "%s\n" "[nginx]" "name=nginx repo" \
330+
"baseurl=https://nginx.org/packages/mainline/centos/9/\$basearch/" \
331+
"gpgcheck=1" "enabled=1" "module_hotfixes=true" > /etc/yum.repos.d/nginx.repo \
332+
&& microdnf --nodocs install -y nginx nginx-module-njs nginx-module-image-filter nginx-module-xslt \
333+
&& rm /etc/yum.repos.d/nginx.repo; \
334+
else \
335+
rpm -qa --queryformat "%{NAME}\n" | sort > pkgs-installed \
336+
&& microdnf --nodocs --setopt=install_weak_deps=0 install -y diffutils dnf \
337+
&& rpm -qa --queryformat "%{NAME}\n" | sort > pkgs-new \
338+
&& dnf install -y /ubi-bin/*.rpm \
339+
&& dnf -q repoquery --resolve --requires --recursive --whatrequires nginx --queryformat "%{NAME}" > pkgs-nginx \
340+
&& dnf --setopt=protected_packages= remove -y $(comm -13 pkgs-installed pkgs-new | comm -13 pkgs-nginx -) \
341+
&& rm pkgs-installed pkgs-new pkgs-nginx; \
342+
fi \
343+
&& ubi-clean.sh
344+
345+
320346
############################################# Base image for UBI with NGINX Plus #############################################
321347
FROM ubi-minimal AS ubi-plus
322348
ARG NGINX_PLUS_VERSION

build/scripts/ubi-clean.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/sh
2+
3+
set -e
4+
5+
microdnf remove -y shadow-utils subscription-manager
6+
microdnf clean all && rm -rf /var/cache/dnf

build/scripts/ubi-setup.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/sh
2+
3+
set -e
4+
5+
microdnf --nodocs install -y shadow-utils subscription-manager
6+
groupadd --system --gid 101 nginx
7+
useradd --system --gid nginx --no-create-home --home-dir /nonexistent --comment "nginx user" --shell /bin/false --uid 101 nginx
8+
rpm --import /tmp/nginx_signing.key

docs/content/technical-specifications.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ We test NGINX Ingress Controller on a range of Kubernetes platforms for each rel
2828
{{< bootstrap-table "table table-bordered table-striped table-responsive" >}}
2929
| NIC Version | Supported Kubernetes Version | NIC Helm Chart Version | NIC Operator Version | NGINX / NGINX Plus version |
3030
| --- | --- | --- | --- | --- |
31-
| {{< nic-version >}} | 1.25 - 1.30 | {{< nic-helm-version >}} | {{< nic-operator-version >}} | 1.27.0 / R32 |
31+
| {{< nic-version >}} | 1.25 - 1.30 | {{< nic-helm-version >}} | {{< nic-operator-version >}} | 1.27.1 / R32 |
3232
| 3.5.2 | 1.23 - 1.30 | 1.2.2 | 2.2.2 | 1.27.0 / R32 |
3333
| 3.4.3 | 1.23 - 1.29 | 1.1.3 | 2.1.2 | 1.25.4 / R31 P1 |
3434
| 3.3.2 | 1.22 - 1.28 | 1.0.2 | 2.0.2 | 1.25.3 / R30 |
@@ -54,14 +54,14 @@ We provide the following Docker images, which include NGINX or NGINX Plus bundle
5454

5555
### Images with NGINX
5656

57-
_All images include NGINX 1.27.0._
57+
_All images include NGINX 1.27.1._
5858

5959
{{< bootstrap-table "table table-bordered table-responsive" >}}
6060
|<div style="width:200px">Name</div> | <div style="width:100px">Base image</div> | <div style="width:200px">Third-party modules</div> | DockerHub image | Architectures |
6161
| ---| --- | --- | --- | --- |
62-
|Alpine-based image | ``nginx:1.27.0-alpine``,<br>based on on ``alpine:3.19`` | NGINX OpenTracing module<br><br>OpenTracing library<br><br>OpenTracing tracers for Jaeger<br><br>Zipkin and Datadog | ``nginx/nginx-ingress:{{< nic-version >}}-alpine`` | arm/v7<br>arm64<br>amd64<br>ppc64le<br>s390x |
63-
|Debian-based image | ``nginx:1.27.0``,<br>based on on ``debian:12-slim`` | NGINX OpenTracing module<br><br>OpenTracing library<br><br>OpenTracing tracers for Jaeger<br><br>Zipkin and Datadog | ``nginx/nginx-ingress:{{< nic-version >}}`` | arm/v7<br>arm64<br>amd64<br>ppc64le<br>s390x |
64-
|Ubi-based image | ``nginxcontrib/nginx:1.27.0-ubi``,<br>based on on ``redhat/ubi9-minimal`` | | ``nginx/nginx-ingress:{{< nic-version >}}-ubi`` | arm64<br>amd64<br>ppc64le<br>s390x |
62+
|Alpine-based image | ``nginx:1.27.1-alpine``,<br>based on on ``alpine:3.20`` | NGINX OpenTracing module<br><br>OpenTracing library<br><br>OpenTracing tracers for Jaeger<br><br>Zipkin and Datadog | ``nginx/nginx-ingress:{{< nic-version >}}-alpine`` | arm/v7<br>arm64<br>amd64<br>ppc64le<br>s390x |
63+
|Debian-based image | ``nginx:1.27.1``,<br>based on on ``debian:12-slim`` | NGINX OpenTracing module<br><br>OpenTracing library<br><br>OpenTracing tracers for Jaeger<br><br>Zipkin and Datadog | ``nginx/nginx-ingress:{{< nic-version >}}`` | arm/v7<br>arm64<br>amd64<br>ppc64le<br>s390x |
64+
|Ubi-based image | ``redhat/ubi9-minimal`` | | ``nginx/nginx-ingress:{{< nic-version >}}-ubi`` | arm64<br>amd64<br>ppc64le<br>s390x |
6565
{{% /bootstrap-table %}}
6666

6767
---

examples/custom-resources/api-key/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ curl -k --resolve cafe.example.com:$IC_HTTPS_PORT:$IC_IP -H "X-header-name: wron
8585
<head><title>403 Forbidden</title></head>
8686
<body>
8787
<center><h1>403 Forbidden</h1></center>
88-
<hr><center>nginx/1.27.0</center>
88+
<hr><center>nginx/1.27.1</center>
8989
</body>
9090
</html>
9191
```

0 commit comments

Comments
 (0)