@@ -16,7 +16,9 @@ RUN apt-get update \
1616# docker.io/library/nginx is a temporary workaround for Dependabot to see this as different from the one used in Debian
1717FROM docker.io/library/nginx:1.21.6-alpine AS alpine
1818
19- RUN apk add --no-cache libcap
19+ RUN apk add --no-cache libcap \
20+ # temp fix for CVE-2022-0778
21+ && apk upgrade --no-cache libretls
2022
2123
2224# ############################################ Base image for Alpine with NGINX Plus #############################################
@@ -40,8 +42,6 @@ RUN --mount=type=secret,id=nginx-repo.crt,dst=/etc/ssl/nginx/nginx-repo.crt,mode
4042 --mount=type=secret,id=nginx-repo.key,dst=/etc/ssl/nginx/nginx-repo.key,mode=0644 \
4143 apt-get update \
4244 && apt-get install --no-install-recommends --no-install-suggests -y ca-certificates gnupg curl apt-transport-https libcap2-bin \
43- # temporary fix for CVE-2021-3520, CVE-2021-33560, CVE-2021-20231, CVE-2021-20305, CVE-2021-20305
44- && apt-get install -y liblz4-1 libgcrypt20 libgnutls30 libhogweed4 libnettle6 \
4545 && curl -sSL https://cs.nginx.com/static/keys/nginx_signing.key | gpg --dearmor > /etc/apt/trusted.gpg.d/nginx_signing.gpg \
4646 && curl -sSL -o /etc/apt/apt.conf.d/90pkgs-nginx https://cs.nginx.com/static/files/90pkgs-nginx \
4747 && 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 \
@@ -216,6 +216,7 @@ ARG BUILD_OS
216216ARG IC_VERSION
217217ARG GIT_COMMIT
218218ARG DATE
219+ ARG TARGETPLATFORM
219220
220221RUN mkdir -p /var/lib/nginx /etc/nginx/secrets /etc/nginx/stream-conf.d \
221222 && setcap 'cap_net_bind_service=+ep' /usr/sbin/nginx 'cap_net_bind_service=+ep' /usr/sbin/nginx-debug \
@@ -243,9 +244,12 @@ LABEL org.opencontainers.image.documentation="https://docs.nginx.com/nginx-ingre
243244LABEL org.opencontainers.image.source="https://github.com/nginxinc/kubernetes-ingress"
244245LABEL org.opencontainers.image.vendor="NGINX Inc <kubernetes@nginx.com>"
245246LABEL org.opencontainers.image.licenses="Apache-2.0"
246- LABEL org.opencontainers.image.version="${IC_VERSION}-${BUILD_OS}-${NGINX_PLUS_VERSION}${NGINX_VERSION} "
247+ LABEL org.opencontainers.image.version="${IC_VERSION}"
247248LABEL org.opencontainers.image.revision="${GIT_COMMIT}"
248249LABEL org.opencontainers.image.created="${DATE}"
250+ LABEL org.nginx.kic.image.build.target="${TARGETPLATFORM}"
251+ LABEL org.nginx.kic.image.build.os="${BUILD_OS}"
252+ LABEL org.nginx.kic.image.build.nginx.version="${NGINX_PLUS_VERSION}${NGINX_VERSION}"
249253
250254
251255# ############################################ Build nginx-ingress in golang container #############################################
0 commit comments