Skip to content

Commit 821e090

Browse files
committed
Update Debian to Bullseye and Alpine to 3.15
1 parent 632e3e7 commit 821e090

File tree

3 files changed

+24
-22
lines changed

3 files changed

+24
-22
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ debian-image-plus: build ## Create Docker image for Ingress Controller (nginx pl
7373

7474
.PHONY: debian-image-nap-plus
7575
debian-image-nap-plus: build ## Create Docker image for Ingress Controller (nginx plus with nap)
76-
$(DOCKER_CMD) $(PLUS_ARGS) --build-arg BUILD_OS=debian-plus-nap --build-arg FILES=nap-common
76+
$(DOCKER_CMD) $(PLUS_ARGS) --build-arg BUILD_OS=debian-plus-nap --build-arg FILES=nap-common --build-arg DEBIAN_VERSION=buster-slim
7777

7878
.PHONY: openshift-image
7979
openshift-image: build ## Create Docker image for Ingress Controller (ubi)

build/Dockerfile

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ ARG BUILD_OS=debian
33
ARG NGINX_PLUS_VERSION=r26
44
ARG UBI_VERSION=8
55
ARG FILES=
6+
ARG DEBIAN_VERSION=bullseye-slim
67

78
############################################# Base image for Debian #############################################
89
FROM nginx:1.21.6 AS debian
@@ -22,33 +23,36 @@ RUN apk add --no-cache libcap \
2223

2324

2425
############################################# Base image for Alpine with NGINX Plus #############################################
25-
FROM alpine:3.13 as alpine-plus
26+
FROM alpine:3.15 as alpine-plus
2627
ARG NGINX_PLUS_VERSION
2728

2829
RUN --mount=type=secret,id=nginx-repo.crt,dst=/etc/apk/cert.pem,mode=0644 \
2930
--mount=type=secret,id=nginx-repo.key,dst=/etc/apk/cert.key,mode=0644 \
3031
wget -nv -O /etc/apk/keys/nginx_signing.rsa.pub https://cs.nginx.com/static/keys/nginx_signing.rsa.pub \
3132
&& printf "%s\n" "https://pkgs.nginx.com/plus/alpine/v$(grep -E -o '^[0-9]+\.[0-9]+' /etc/alpine-release)/main" >> /etc/apk/repositories \
33+
# temp fix for CVE-2022-0778
34+
&& apk upgrade --no-cache libretls \
3235
&& apk add --no-cache libcap nginx-plus~${NGINX_PLUS_VERSION#r} nginx-plus-module-njs~${NGINX_PLUS_VERSION#r}
3336

3437

3538
############################################# Base image for Debian with NGINX Plus #############################################
36-
FROM debian:buster-slim AS debian-plus
39+
FROM debian:${DEBIAN_VERSION} AS debian-plus
3740
ARG IC_VERSION
3841
ARG NGINX_PLUS_VERSION
42+
ARG BUILD_OS
3943

4044
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
4145
RUN --mount=type=secret,id=nginx-repo.crt,dst=/etc/ssl/nginx/nginx-repo.crt,mode=0644 \
4246
--mount=type=secret,id=nginx-repo.key,dst=/etc/ssl/nginx/nginx-repo.key,mode=0644 \
4347
apt-get update \
4448
&& apt-get install --no-install-recommends --no-install-suggests -y ca-certificates gnupg curl apt-transport-https libcap2-bin \
45-
&& curl -sSL https://cs.nginx.com/static/keys/nginx_signing.key | gpg --dearmor > /etc/apt/trusted.gpg.d/nginx_signing.gpg \
46-
&& curl -sSL -o /etc/apt/apt.conf.d/90pkgs-nginx https://cs.nginx.com/static/files/90pkgs-nginx \
49+
&& curl -fsSL https://cs.nginx.com/static/keys/nginx_signing.key | gpg --dearmor > /etc/apt/trusted.gpg.d/nginx_signing.gpg \
50+
&& curl -fsSL -o /etc/apt/apt.conf.d/90pkgs-nginx https://cs.nginx.com/static/files/90pkgs-nginx \
51+
&& DEBIAN_VERSION=$(awk -F '=' '/^VERSION_CODENAME=/ {print $2}' /etc/os-release) \
4752
&& printf "%s\n" "Acquire::https::pkgs.nginx.com::User-Agent \"k8s-ic-$IC_VERSION${BUILD_OS##debian-plus}-apt\";" >> /etc/apt/apt.conf.d/90pkgs-nginx \
48-
&& printf "%s\n" "deb https://pkgs.nginx.com/plus/${NGINX_PLUS_VERSION^^}/debian buster nginx-plus" > /etc/apt/sources.list.d/nginx-plus.list \
53+
&& printf "%s\n" "deb https://pkgs.nginx.com/plus/${NGINX_PLUS_VERSION^^}/debian ${DEBIAN_VERSION} nginx-plus" > /etc/apt/sources.list.d/nginx-plus.list \
4954
&& apt-get update \
50-
&& apt-get install --no-install-recommends --no-install-suggests -y \
51-
nginx-plus-${NGINX_PLUS_VERSION} nginx-plus-module-njs-${NGINX_PLUS_VERSION} \
55+
&& apt-get install --no-install-recommends --no-install-suggests -y nginx-plus nginx-plus-module-njs \
5256
&& apt-get purge --auto-remove -y apt-transport-https gnupg curl \
5357
&& rm -rf /var/lib/apt/lists/*
5458

@@ -62,14 +66,12 @@ RUN --mount=type=secret,id=nginx-repo.crt,dst=/etc/ssl/nginx/nginx-repo.crt,mode
6266
--mount=type=secret,id=nginx-repo.key,dst=/etc/ssl/nginx/nginx-repo.key,mode=0644 \
6367
apt-get update \
6468
&& apt-get install --no-install-recommends --no-install-suggests -y gnupg curl apt-transport-https \
65-
&& curl -sSL https://cs.nginx.com/static/keys/app-protect-security-updates.key | gpg --dearmor > /etc/apt/trusted.gpg.d/nginx_app_signing.gpg \
69+
&& curl -fsSL https://cs.nginx.com/static/keys/app-protect-security-updates.key | gpg --dearmor > /etc/apt/trusted.gpg.d/nginx_app_signing.gpg \
70+
&& DEBIAN_VERSION=$(awk -F '=' '/^VERSION_CODENAME=/ {print $2}' /etc/os-release) \
6671
&& printf "%s\n" "deb https://pkgs.nginx.com/app-protect/${NGINX_PLUS_VERSION^^}/debian buster nginx-plus" \
67-
"deb https://pkgs.nginx.com/app-protect-security-updates/debian buster nginx-plus" > /etc/apt/sources.list.d/nginx-app-protect.list \
72+
"deb https://pkgs.nginx.com/app-protect-security-updates/debian ${DEBIAN_VERSION} nginx-plus" > /etc/apt/sources.list.d/nginx-app-protect.list \
6873
&& apt-get update \
69-
# searching apt-cache for the latest version of NAP package compatible with the $NGINX_PLUS_VERSION
70-
&& module_version=$(apt-cache showpkg nginx-plus-module-appprotect | awk -v ver="nginx-plus-$NGINX_PLUS_VERSION" '{ if ($6 == ver) {print $1; exit}}') \
71-
&& apt-get install --no-install-recommends --no-install-suggests -y nginx-plus-module-appprotect=${module_version} app-protect=${module_version} \
72-
&& apt-get install --no-install-recommends --no-install-suggests -y app-protect-attack-signatures app-protect-threat-campaigns \
74+
&& apt-get install --no-install-recommends --no-install-suggests -y app-protect app-protect-attack-signatures app-protect-threat-campaigns \
7375
&& apt-get purge --auto-remove -y apt-transport-https gnupg curl \
7476
&& rm -rf /var/lib/apt/lists/* \
7577
&& rm /etc/apt/sources.list.d/nginx-app-protect.list

docs-web/technical-specifications.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,19 +26,19 @@ The supported architecture is x86-64.
2626
- Third-party modules
2727
- DockerHub image
2828
* - Debian-based image
29-
- ``nginx:1.21.6``, which is based on ``debian:buster-slim``
29+
- ``nginx:1.21.6``, which is based on ``debian:bullseye-slim``
3030
-
3131
- ``nginx/nginx-ingress:1.12.3``
3232
* - Alpine-based image
33-
- ``nginx:1.21.6-alpine``, which is based on ``alpine:3.13``
33+
- ``nginx:1.21.6-alpine``, which is based on ``alpine:3.15``
3434
-
3535
- ``nginx/nginx-ingress:1.12.3-alpine``
3636
* - Debian-based image with Opentracing
37-
- ``nginx:1.21.6``, which is based on ``debian:buster-slim``
37+
- ``nginx:1.21.6``, which is based on ``debian:bullseye-slim``
3838
- NGINX OpenTracing module, OpenTracing library, OpenTracing tracers for Jaeger, Zipkin and Datadog
3939
-
4040
* - Ubi-based image
41-
- ``registry.access.redhat.com/ubi8/ubi:8.3``
41+
- ``redhat/ubi8-minimal``
4242
-
4343
- ``nginx/nginx-ingress:1.12.3-ubi``
4444
```
@@ -58,16 +58,16 @@ NGINX Plus images are not available through DockerHub.
5858
- Base image
5959
- Third-party modules
6060
* - Alpine-based image
61-
- ``alpine:3.13``
61+
- ``alpine:3.15``
6262
-
6363
* - Debian-based image
64-
- ``debian:buster-slim``
64+
- ``debian:bullseye-slim``
6565
-
6666
* - Debian-based image with Opentracing
67-
- ``debian:buster-slim``
67+
- ``debian:bullseye-slim``
6868
- NGINX Plus OpenTracing module, OpenTracing tracers for Jaeger, Zipkin and Datadog
6969
* - Ubi-based image
70-
- ``registry.access.redhat.com/ubi8/ubi:8.3``
70+
- ``redhat/ubi8-minimal``
7171
-
7272
* - Debian-based image with App Protect
7373
- ``debian:buster-slim``

0 commit comments

Comments
 (0)