Skip to content

Commit 42b3375

Browse files
authored
Update packages for CVEs (#4033)
1 parent a9e451d commit 42b3375

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

build/Dockerfile

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ FROM nginx:1.25.1 AS debian
1515
RUN --mount=type=bind,from=opentracing-lib,target=/tmp/ot/ \
1616
apt-get update \
1717
&& apt-get install --no-install-recommends --no-install-suggests -y libcap2-bin \
18-
# temp fix for CVE-2022-3821, CVE-2022-29458, CVE-2023-28484 and CVE-2022-44617
19-
&& apt-get install ncurses-base ncurses-bin libudev1 libsystemd0 libtinfo6 libxml2 libxpm4 \
2018
&& rm -rf /var/lib/apt/lists/* \
2119
&& cp -av /tmp/ot/usr/local/lib/libopentracing.so* /tmp/ot/usr/local/lib/libjaegertracing*so* /tmp/ot/usr/local/lib/libzipkin*so* /tmp/ot/usr/local/lib/libdd*so* /tmp/ot/usr/local/lib/libyaml*so* /usr/local/lib/ \
2220
&& cp -av /tmp/ot/usr/lib/nginx/modules/ngx_http_opentracing_module.so /usr/lib/nginx/modules/ \
@@ -28,8 +26,8 @@ FROM nginx:1.25.1-alpine AS alpine
2826

2927
RUN --mount=type=bind,from=alpine-opentracing-lib,target=/tmp/ot/ \
3028
apk add --no-cache libcap libstdc++ \
31-
# temp fix for CVE-2023-1255 and CVE-2023-28484
32-
&& apk upgrade --no-cache libcrypto3 libssl3 libxml2 \
29+
# temp fix for CVE-2023-3138
30+
&& apk upgrade --no-cache libx11 \
3331
&& cp -av /tmp/ot/usr/local/lib/libopentracing.so* /tmp/ot/usr/local/lib/libjaegertracing*so* /tmp/ot/usr/local/lib/libzipkin*so* /tmp/ot/usr/local/lib/libdd*so* /tmp/ot/usr/local/lib/libyaml*so* /usr/local/lib/ \
3432
&& cp -av /tmp/ot/usr/lib/nginx/modules/ngx_http_opentracing_module.so /usr/lib/nginx/modules/ \
3533
&& ldconfig /usr/local/lib/
@@ -45,8 +43,6 @@ RUN --mount=type=secret,id=nginx-repo.crt,dst=/etc/apk/cert.pem,mode=0644 \
4543
wget -nv -O /etc/apk/keys/nginx_signing.rsa.pub https://cs.nginx.com/static/keys/nginx_signing.rsa.pub \
4644
&& printf "%s\n" "https://pkgs.nginx.com/plus/${NGINX_PLUS_VERSION}/alpine/v$(grep -E -o '^[0-9]+\.[0-9]+' /etc/alpine-release)/main" >> /etc/apk/repositories \
4745
&& apk add --no-cache nginx-plus nginx-plus-module-njs nginx-plus-module-opentracing libcap libcurl \
48-
# temp fix for CVE-2023-1255
49-
&& apk upgrade --no-cache libcrypto3 libssl3 \
5046
&& cp -av /tmp/ot/usr/local/lib/libjaegertracing*so* /tmp/ot/usr/local/lib/libzipkin*so* /tmp/ot/usr/local/lib/libdd*so* /tmp/ot/usr/local/lib/libyaml*so* /usr/local/lib/ \
5147
&& ldconfig /usr/local/lib/
5248

@@ -70,8 +66,6 @@ RUN --mount=type=secret,id=nginx-repo.crt,dst=/etc/ssl/nginx/nginx-repo.crt,mode
7066
&& 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 \
7167
&& apt-get update \
7268
&& apt-get install --no-install-recommends --no-install-suggests -y nginx-plus nginx-plus-module-njs nginx-plus-module-opentracing libcap2-bin libcurl4 \
73-
# temp fix for CVE-2022-3821 and CVE-2022-29458
74-
&& apt-get install ncurses-base ncurses-bin libudev1 libsystemd0 \
7569
&& apt-get purge --auto-remove -y apt-transport-https gnupg curl \
7670
&& cp -av /tmp/ot/usr/local/lib/libjaegertracing*so* /tmp/ot/usr/local/lib/libzipkin*so* /tmp/ot/usr/local/lib/libdd*so* /tmp/ot/usr/local/lib/libyaml*so* /usr/local/lib/ \
7771
&& ldconfig \
@@ -161,6 +155,8 @@ RUN --mount=type=secret,id=nginx-repo.crt,dst=/etc/ssl/nginx/nginx-repo.crt,mode
161155
&& 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 \
162156
&& sed -i "0,/centos/s;;${NGINX_PLUS_VERSION}/centos;" /etc/yum.repos.d/nginx-plus.repo \
163157
&& dnf --nodocs install -y nginx-plus nginx-plus-module-njs \
158+
# temp fix for CVE-2023-24329
159+
&& dnf upgrade -y platform-python \
164160
## end of duplicated code
165161
&& sed -i 's/\(def in_container():\)/\1\n return False/g' /usr/lib64/python*/*-packages/rhsm/config.py \
166162
&& subscription-manager register --org=${RHEL_ORGANIZATION} --activationkey=${RHEL_ACTIVATION_KEY} || true \

0 commit comments

Comments
 (0)