Skip to content

Commit b9dcfbb

Browse files
committed
Update UBI base image
1 parent 0e61d80 commit b9dcfbb

File tree

5 files changed

+25
-34
lines changed

5 files changed

+25
-34
lines changed

.github/workflows/edge.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -100,12 +100,9 @@ jobs:
100100
runs-on: ubuntu-20.04
101101
needs: binary
102102
strategy:
103+
fail-fast: false
103104
matrix:
104105
image: [debian, alpine, opentracing, ubi]
105-
ubi_version: ["8"]
106-
include:
107-
- image: ubi
108-
ubi_version: 7
109106
steps:
110107
- name: Checkout Repository
111108
uses: actions/checkout@v2
@@ -140,7 +137,6 @@ jobs:
140137
build-args: |
141138
BUILD_OS=${{ matrix.image }}
142139
NGINX_VERSION=${{ steps.commit.outputs.nginx_version }}
143-
UBI_VERSION=${{ matrix.ubi_version }}
144140
- name: Run Trivy vulnerability scanner
145141
uses: aquasecurity/trivy-action@master
146142
with:
@@ -165,6 +161,7 @@ jobs:
165161
runs-on: ubuntu-20.04
166162
needs: [binary, unit-tests]
167163
strategy:
164+
fail-fast: false
168165
matrix:
169166
include:
170167
- image: debian
@@ -328,6 +325,7 @@ jobs:
328325
needs: [smoke-tests, helm-tests]
329326
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
330327
strategy:
328+
fail-fast: false
331329
matrix:
332330
include:
333331
- tag: edge

.github/workflows/release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ jobs:
6060
runs-on: ubuntu-20.04
6161
needs: [binary]
6262
strategy:
63+
fail-fast: false
6364
matrix:
6465
include:
6566
- tag: ${{ needs.binary.outputs.version }}

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ openshift-image-plus: build ## Create Docker image for Ingress Controller (ubi w
8686

8787
.PHONY: openshift-image-nap-plus
8888
openshift-image-nap-plus: build ## Create Docker image for Ingress Controller (ubi with plus and nap)
89-
$(DOCKER_CMD) $(PLUS_ARGS) --secret id=rhel_license,src=rhel_license --build-arg BUILD_OS=ubi-plus-nap --build-arg FILES=nap-common --build-arg UBI_VERSION=7
89+
$(DOCKER_CMD) $(PLUS_ARGS) --secret id=rhel_license,src=rhel_license --build-arg BUILD_OS=ubi-plus-nap --build-arg FILES=nap-common
9090

9191
.PHONY: debian-image-opentracing
9292
debian-image-opentracing: build ## Create Docker image for Ingress Controller (with opentracing)

build/Dockerfile

Lines changed: 17 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# syntax=docker/dockerfile:1.2
22
ARG BUILD_OS=debian
33
ARG NGINX_PLUS_VERSION=r26
4-
ARG UBI_VERSION=8
54
ARG FILES=
65
ARG DEBIAN_VERSION=bullseye-slim
76

@@ -81,18 +80,9 @@ RUN --mount=type=secret,id=nginx-repo.crt,dst=/etc/ssl/nginx/nginx-repo.crt,mode
8180
# RUN update-ca-certificates
8281

8382

84-
############################################# Base image for UBI 8 #############################################
85-
FROM redhat/ubi8-minimal AS ubi-base-8
86-
87-
88-
############################################# Base image for UBI 7 #############################################
89-
FROM registry.access.redhat.com/ubi7/ubi AS ubi-base-7
90-
91-
RUN yum install -y microdnf
92-
93-
9483
############################################# Base image for UBI #############################################
95-
FROM ubi-base-${UBI_VERSION} AS ubi-base
84+
FROM redhat/ubi8 AS ubi-base
85+
ARG IC_VERSION
9686

9787
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
9888
LABEL name="NGINX Ingress Controller" \
@@ -105,7 +95,9 @@ LABEL name="NGINX Ingress Controller" \
10595
io.k8s.description="The NGINX Ingress controller is an application that runs in a cluster and configures an HTTP load balancer according to Ingress resources." \
10696
io.openshift.tags="nginx,ingress-controller,ingress,controller,kubernetes,openshift"
10797

108-
RUN microdnf --nodocs install -y shadow-utils ca-certificates \
98+
RUN dnf --nodocs install -y shadow-utils ca-certificates \
99+
# temporary fix for CVE-2022-24407
100+
&& dnf --nodocs install -y cyrus-sasl-lib \
109101
&& groupadd --system --gid 101 nginx \
110102
&& useradd --system --gid nginx --no-create-home --home-dir /nonexistent --comment "nginx user" --shell /bin/false --uid 101 nginx
111103

@@ -121,7 +113,7 @@ RUN rpm --import https://nginx.org/keys/nginx_signing.key \
121113
&& printf "%s\n" "[nginx]" "name=nginx repo" \
122114
"baseurl=https://nginx.org/packages/mainline/centos/${version}/\$basearch/" \
123115
"gpgcheck=1" "enabled=1" "module_hotfixes=true" > /etc/yum.repos.d/nginx.repo \
124-
&& microdnf --nodocs install -y nginx-${NGINX_VERSION} \
116+
&& dnf --nodocs install -y nginx-${NGINX_VERSION} \
125117
&& rm /etc/yum.repos.d/nginx.repo
126118

127119

@@ -132,8 +124,8 @@ ARG NGINX_PLUS_VERSION
132124
RUN --mount=type=secret,id=nginx-repo.crt,dst=/etc/ssl/nginx/nginx-repo.crt,mode=0644 \
133125
--mount=type=secret,id=nginx-repo.key,dst=/etc/ssl/nginx/nginx-repo.key,mode=0644 \
134126
rpm --import https://cs.nginx.com/static/keys/nginx_signing.key \
135-
&& curl -sS "https://cs.nginx.com/static/files/nginx-plus-$(grep -E -o '[0-9]+\.[0-9]+' /etc/redhat-release | cut -d"." -f1).repo" | tr 0 1 > /etc/yum.repos.d/nginx-plus.repo \
136-
&& microdnf --nodocs install -y nginx-plus-${NGINX_PLUS_VERSION} nginx-plus-module-njs-${NGINX_PLUS_VERSION}
127+
&& curl -fsSL "https://cs.nginx.com/static/files/nginx-plus-$(grep -E -o '[0-9]+\.[0-9]+' /etc/redhat-release | cut -d"." -f1).repo" | tr 0 1 > /etc/yum.repos.d/nginx-plus.repo \
128+
&& dnf --nodocs install -y nginx-plus-${NGINX_PLUS_VERSION} nginx-plus-module-njs-${NGINX_PLUS_VERSION}
137129

138130

139131
############################################# Base image for UBI with NGINX Plus and App Protect #############################################
@@ -143,16 +135,16 @@ ARG NGINX_PLUS_VERSION
143135
RUN --mount=type=secret,id=nginx-repo.crt,dst=/etc/ssl/nginx/nginx-repo.crt,mode=0644 \
144136
--mount=type=secret,id=nginx-repo.key,dst=/etc/ssl/nginx/nginx-repo.key,mode=0644 \
145137
--mount=type=secret,id=rhel_license,dst=/tmp/rhel_license,mode=0644 \
146-
set -x \
147-
&& source /tmp/rhel_license \
148-
&& curl -sS https://cs.nginx.com/static/files/app-protect-7.repo > /etc/yum.repos.d/app-protect-7.repo \
138+
source /tmp/rhel_license \
149139
&& subscription-manager register --org=${RHEL_ORGANIZATION} --activationkey=${RHEL_ACTIVATION_KEY} || true \
150-
&& subscription-manager attach --auto \
151-
&& subscription-manager repos --enable rhel-7-server-optional-rpms --enable rhel-7-server-extras-rpms \
152-
&& rpm -ivh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm \
153-
&& yum clean all \
154-
&& yum install -y nginx-plus-module-appprotect-${NGINX_PLUS_VERSION} $(repoquery app-protect-${NGINX_PLUS_VERSION#r}*) app-protect-attack-signatures app-protect-threat-campaigns \
155-
&& rm /etc/yum.repos.d/app-protect-7.repo
140+
&& subscription-manager attach \
141+
&& dnf config-manager --set-enabled codeready-builder-for-rhel-8-x86_64-rpms \
142+
&& dnf --nodocs install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm \
143+
&& curl -fsSL https://cs.nginx.com/static/files/app-protect-8.repo > /etc/yum.repos.d/app-protect-8.repo \
144+
&& dnf --nodocs install -y app-protect-${NGINX_PLUS_VERSION#r}* app-protect-attack-signatures app-protect-threat-campaigns \
145+
&& rm /etc/yum.repos.d/app-protect*.repo \
146+
&& subscription-manager unregister \
147+
&& dnf clean all && rm -rf /var/cache/dnf
156148

157149
# Uncomment the lines below if you want to install a custom CA certificate
158150
# COPY build/*.crt /etc/pki/ca-trust/source/anchors/

docs-web/technical-specifications.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ The supported architecture is x86-64.
3838
- NGINX OpenTracing module, OpenTracing library, OpenTracing tracers for Jaeger, Zipkin and Datadog
3939
-
4040
* - Ubi-based image
41-
- ``redhat/ubi8-minimal``
41+
- ``redhat/ubi8``
4242
-
4343
- ``nginx/nginx-ingress:1.12.3-ubi``
4444
```
@@ -67,13 +67,13 @@ NGINX Plus images are not available through DockerHub.
6767
- ``debian:bullseye-slim``
6868
- NGINX Plus OpenTracing module, OpenTracing tracers for Jaeger, Zipkin and Datadog
6969
* - Ubi-based image
70-
- ``redhat/ubi8-minimal``
70+
- ``redhat/ubi8``
7171
-
7272
* - Debian-based image with App Protect
7373
- ``debian:buster-slim``
7474
- NGINX Plus App Protect module
7575
* - Ubi-based image with App Protect
76-
- ``registry.access.redhat.com/ubi7/ubi``
76+
- ``redhat/ubi8``
7777
- NGINX Plus App Protect module
7878
```
7979

0 commit comments

Comments
 (0)