Skip to content

Commit 45f64d0

Browse files
craig[bot]rail
andcommitted
Merge #153990
153990: build: upgrade UBI base image to 10 r=jlinder,rickystewart a=rail Previously, we were using UBI 9 as the base image for our Docker builds. This commit upgrades the base image to UBI 10, which provides access to newer packages and security updates. * No need to remove and reinstall tzdata in UBI 10, because it is not installed by default. * Use `update-crypto-policies --set FIPS` instead of `fips-mode-setup` to enable FIPS mode, as the latter is not available in UBI 10. Epic: none Release note (general change): Docker images now use UBI 10 as the base image. Co-authored-by: Rail Aliiev <rail@iqchoice.com>
2 parents d80587b + 8d6be42 commit 45f64d0

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

build/deploy/Dockerfile

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
# We use a docker image mirror to avoid pulling from 3rd party repos, which sometimes have reliability issues.
22
# See https://cockroachlabs.atlassian.net/wiki/spaces/devinf/pages/3462594561/Docker+image+sync for the details.
3-
FROM us-east1-docker.pkg.dev/crl-docker-sync/registry-access-redhat-com/ubi9/ubi-minimal
3+
FROM us-east1-docker.pkg.dev/crl-docker-sync/registry-access-redhat-com/ubi10/ubi-minimal
44
ARG fips_enabled
55

66
# For deployment, we need the following additionally installed:
7-
# tzdata - for time zone functions; reinstalled to replace the missing
8-
# files in /usr/share/zoneinfo/
7+
# tzdata - for time zone functions
98
# hostname - used in cockroach k8s manifests
109
# tar - used by kubectl cp
1110
RUN microdnf update -y \
12-
&& rpm --erase --nodeps tzdata \
1311
&& microdnf install tzdata hostname tar gzip xz -y \
1412
&& rm -rf /var/cache/yum
1513
# FIPS mode requires the `openssl` package installed. Also we need to temporarily
@@ -20,7 +18,7 @@ RUN if [ "$fips_enabled" == "1" ]; then \
2018
microdnf install -y openssl && \
2119
rpm -qa | sort > /before.txt && \
2220
microdnf install -y crypto-policies-scripts && \
23-
fips-mode-setup --enable --no-bootcfg && \
21+
update-crypto-policies --set FIPS && \
2422
rpm -qa | sort > /after.txt && \
2523
microdnf remove -y $(comm -13 /before.txt /after.txt) && \
2624
microdnf clean all && \

0 commit comments

Comments
 (0)