This is an automated email from the ASF dual-hosted git repository.
morningman pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new 5bc6ed62f9b [chore](build) Upgrade runtime images to Ubuntu 26.04 and
add UBI 9 (#70770)
5bc6ed62f9b is described below
commit 5bc6ed62f9b01cd2cecaf9a3420d5ee015638ec1
Author: Mingyu Chen (Rayner) <[email protected]>
AuthorDate: Fri Nov 20 13:33:22 2026 +0800
[chore](build) Upgrade runtime images to Ubuntu 26.04 and add UBI 9 (#70770)
### Background
The runtime image builder packages existing Doris releases into FE, BE
and MS images with a selected JDK and Operator tools. Component images
share one base, while all-in-one and doris-compose use their own Temurin
bases. These paths currently use Ubuntu 22.04.
### What problem does this PR solve?
Issue Number: None
Related PR: None
PR Type: Build/CI/Chore
Problem Summary:
Runtime image builders need the latest Ubuntu LTS and a separate UBI 9
option. Upgrade the Ubuntu paths to 26.04 and add a UBI 9 entry point,
sharing release verification and component packaging while keeping
package installation separate. The change also handles Ubuntu's new
APT/SSL/MySQL packages, HTTPS certificate bootstrap, and timezone files
removed from UBI Minimal. Ubuntu component tags remain unchanged; UBI
tags add `-ubi9`.
### Details
- **Change map:** 431 build/configuration lines, 64 test lines and 84
documentation lines. The build changes cover shared release packaging
with two entry points, distro-specific runtime dependencies, and updated
default image inputs across the three Ubuntu build paths. No kernel code
or generated results change.
- **Affected:** Runtime Docker builds for amd64 and arm64, Java 8 and
17, FE/BE/MS, all-in-one 4.1 and doris-compose. Doris compiler settings
and release archive contents are unchanged.
- **Developer and release impact:** Ubuntu remains the default. UBI uses
`docker-build-ubi9.sh`, separate base tags and an isolated output
directory. The retained Jammy installer supports explicit rollback
inputs. Existing published base-7.0 tags are not repointed.
- **License and third-party:** UBI uses its public BaseOS/AppStream
repositories. Image digests are pinned; JDK feature/patch versions and
Operator/Go pins are unchanged. No new application dependencies or
license files are required.
- **Rollback:** Revert the change or use the previous image digests.
Explicit Jammy image overrides remain supported.
- **Behavior change:** New Ubuntu builds use 26.04 and MySQL 8.4. UBI
uses MySQL 8.0 and requires x86-64-v2 on amd64. Build metadata defaults
move into distro-specific subdirectories.
### Testing
- Ten offline build-script tests passed locally, including distro
selection, output isolation, Java 8/no-AVX2 selection, pinned input
forwarding and checksum failures.
- Four ARM64 runtime bases (Ubuntu/UBI, Java 8/17) built and passed
JVM/compiler, MySQL TLS-option, Operator-tool and timezone checks.
- ARM64 FE/BE/MS images built for each distribution. Isolated Doris
4.1.5 clusters passed insert/select, Stream Load and timezone
conversion; BE/MS native dependencies resolved and version commands
succeeded.
- The Jammy installer and the combined additional all-in-one/compose
package set passed local installation checks.
### Notes for Reviewers
Docker Hub pulls failed with authentication and network errors. Local
builds used cached Ubuntu 26.04 and same-version Temurin JDKs, plus
unchanged Go 1.27.4 Operator binaries through a named build context; new
published multi-platform digests were checked through the public
Registry API. Ubuntu package installation used a signed HTTPS mirror.
Complete default-input and all-in-one/compose image builds, amd64
execution, full MS/FDB operation, Kerberos and end-to-end TLS remain
unverified. These tests are manually invoked; no CI workflow currently
runs the runtime script tests.
### Release note
Runtime images default to Ubuntu 26.04 LTS. A separate UBI 9 build
produces FE, BE and MS images with an `-ubi9` tag suffix. UBI 9 requires
x86-64-v2 hardware on amd64; validate older hosts before changing
images.
### Check List (For Author)
- Behavior changed: Yes (see Details)
- Does this need documentation: No (build usage and compatibility are
documented in docker/runtime/README.md)
- Pre-submission status: Partially verified: default-input registry
builds, amd64 and older hosts, full MS/FDB, Kerberos and end-to-end TLS
are not verified.
### AI Disclosure
- Tool: Codex (GPT-6)
- Generated: Code, tests, documentation and this description.
- Human review: not stated
- Prompts: Research the Ubuntu LTS upgrade and an additional UBI 9
runtime family, then implement both on a new branch in the current
checkout and validate locally.
---
docker/runtime/README.md | 80 ++++++++++---
docker/runtime/all-in-one/4.1/Dockerfile | 4 +-
docker/runtime/all-in-one/4.1/README.md | 4 +-
docker/runtime/base-image/Dockerfile_base | 35 ++++--
docker/runtime/base-image/Dockerfile_base_slim | 2 +-
docker/runtime/base-image/install-runtime-ubi9.sh | 39 +++++++
docker/runtime/base-image/install-runtime.sh | 49 ++++++--
docker/runtime/be/Dockerfile | 2 +-
.../runtime/{docker-build.sh => build-runtime.sh} | 12 +-
.../Dockerfile_base_slim => docker-build-ubi9.sh} | 13 ++-
docker/runtime/docker-build.sh | 125 +--------------------
docker/runtime/doris-compose/Dockerfile | 4 +-
docker/runtime/fe/Dockerfile | 2 +-
docker/runtime/ms/Dockerfile | 2 +-
docker/runtime/tests/test_docker_build.py | 64 +++++++++--
15 files changed, 254 insertions(+), 183 deletions(-)
diff --git a/docker/runtime/README.md b/docker/runtime/README.md
index 2b3b691d43b..cf28d0cb9e0 100644
--- a/docker/runtime/README.md
+++ b/docker/runtime/README.md
@@ -19,8 +19,9 @@ under the License.
# Building the Doris runtime images
-The default base image contains the packages needed by the FE, BE and MS entry
-points, one maintained JDK, and rebuilt `doris-debug` / `dorisctl` binaries.
+The default base uses Ubuntu 26.04 LTS. A second build entry point uses Red Hat
+Universal Base Image (UBI) 9 Minimal. Both bases contain the packages needed by
+the FE, BE and MS entry points, one maintained JDK, and rebuilt `doris-debug`
/ `dorisctl` binaries.
Development packages, kernel headers, Python 2 and general profiling tools are
not included. The `all-in-one/` and `doris-compose/` build paths use the same
package-update
policy with their own runtime tools.
@@ -30,7 +31,10 @@ policy with their own runtime tools.
Run from any directory in the checkout:
```bash
+# Ubuntu 26.04
bash docker/runtime/docker-build.sh -v 4.1.5
+# UBI 9
+bash docker/runtime/docker-build-ubi9.sh -v 4.1.5
```
The script downloads the archive and its SHA512 checksum over HTTPS, verifies
@@ -38,12 +42,14 @@ the archive before extracting it, builds the base, and
passes that same base
image to each component build. A checksum failure stops the build. The host
needs Docker with BuildKit, Bash, curl, tar, and either sha512sum or shasum.
-The default working directory is `output/runtime-images/`. Extracted build
+The default working directories are `output/runtime-images/ubuntu26.04/` and
+`output/runtime-images/ubi9/`. Extracted build
contexts are temporary and are removed on exit; source resource directories
are not modified. The downloaded archive and component image inspection JSON
are retained there. Output tags remain `doris.fe:<version>`,
`doris.be:<version>` and `doris.ms:<version>`. Releases without MS build only
-FE and BE.
+FE and BE. UBI tags append `-ubi9`, for example `doris.be:4.1.5-ubi9`, so
+building both distributions does not overwrite either image family.
| Environment variable | Purpose |
| --- | --- |
@@ -51,11 +57,13 @@ FE and BE.
| `DORIS_NO_AVX2=1` | Select the x64-noavx2 release archive. A native Linux
x86_64 host without AVX2 selects it automatically. |
| `DORIS_BASE_IMAGE` | Tag for the newly built base and the base consumed by
all component builds. |
| `DORIS_IMAGE_PREFIX` | Component tag prefix; defaults to `doris`. |
+| `DORIS_IMAGE_TAG_SUFFIX` | Override the component tag suffix (Ubuntu: empty;
UBI: `-ubi9`). |
| `DORIS_IMAGE_WORK_DIR` | Download, staging and image metadata directory. |
| `DORIS_ARCHIVE` | Existing local release archive. It is still verified
before extraction. |
| `DORIS_ARCHIVE_SHA512` | Expected 128-character digest from a trusted
release checksum. When omitted, download the release checksum document. |
| `DORIS_DOWNLOAD_BASE_URL` | HTTPS release mirror; defaults to the Apache
Doris release mirror. |
-| `UBUNTU_IMAGE`, `JDK17_IMAGE`, `JDK8_IMAGE`, `GO_IMAGE` | Base-build input
overrides, for example an approved mirror with the same digest. |
+| `UBUNTU_IMAGE`, `JDK17_IMAGE`, `JDK8_IMAGE`, `GO_IMAGE` | Ubuntu and shared
build input overrides, for example an approved mirror with the same digest. |
+| `UBI9_IMAGE`, `JDK17_UBI9_IMAGE`, `JDK8_UBI9_IMAGE` | UBI Minimal and
Temurin UBI 9 input overrides. |
For an existing archive, obtain its expected digest from the trusted release
metadata, independently of the local file:
@@ -71,7 +79,9 @@ bash docker/runtime/docker-build.sh -v 4.1.5
The build script keeps the previous Java selection: Doris 3.x and newer use
Java 17; older releases use Java 8. The base tags are
-`apache/doris:base-7.0-jdk17` and `apache/doris:base-7.0-jdk8`. Each image
+`apache/doris:base-8.0-ubuntu26.04-jdk17` and
+`apache/doris:base-8.0-ubuntu26.04-jdk8`; the UBI equivalents replace
+`ubuntu26.04` with `ubi9`. Each image
contains only the selected JDK, at `/usr/lib/jvm/java`, with a compatibility
link at `/usr/lib/jvm/jdk-17` or `/usr/lib/jvm/jdk-8`.
@@ -81,16 +91,28 @@ Build a base independently:
docker build --pull --no-cache \
--build-arg JAVA_VERSION=17 \
-f docker/runtime/base-image/Dockerfile_base \
- -t apache/doris:base-7.0-jdk17 docker/runtime/base-image
+ -t apache/doris:base-8.0-ubuntu26.04-jdk17 docker/runtime/base-image
```
+The same Dockerfile shares the JDK selection and operator-tool build between
+both distributions. To build a UBI base independently:
+
+```bash
+docker build --pull --no-cache \
+ --build-arg RUNTIME_DISTRO=ubi9 --build-arg JAVA_VERSION=17 \
+ -f docker/runtime/base-image/Dockerfile_base \
+ -t apache/doris:base-8.0-ubi9-jdk17 docker/runtime/base-image
+```
+
+Pass that UBI base through `BASE_IMAGE` for manual component builds.
+
The default base is already minimal. `Dockerfile_base_slim` is a compatibility
alias of that base, rather than a separate package list:
```bash
-docker build --build-arg BASE_IMAGE=apache/doris:base-7.0-jdk17 \
+docker build --build-arg BASE_IMAGE=apache/doris:base-8.0-ubuntu26.04-jdk17 \
-f docker/runtime/base-image/Dockerfile_base_slim \
- -t apache/doris:base-7.0-jdk17-slim docker/runtime/base-image
+ -t apache/doris:base-8.0-ubuntu26.04-jdk17-slim docker/runtime/base-image
```
For manual component builds, extract the release under
@@ -99,7 +121,7 @@ For example:
```bash
docker build --build-arg DORIS_VERSION=4.1.5 \
- --build-arg BASE_IMAGE=apache/doris:base-7.0-jdk17 \
+ --build-arg BASE_IMAGE=apache/doris:base-8.0-ubuntu26.04-jdk17 \
-f docker/runtime/fe/Dockerfile -t doris.fe:4.1.5 docker/runtime/fe
```
@@ -109,8 +131,10 @@ Do not use `--pull` on a component build that consumes a
locally built base.
## Runtime changes
-- The MySQL CLI comes from `mysql-client-core-8.0`; its TLS options used by
- the entry points remain available.
+- The MySQL CLI comes from Ubuntu's `mysql-client-core` (MySQL 8.4) or
+ UBI's `mysql` package (MySQL 8.0). Both retain the TLS options used by
+ the entry points. UBI keeps `curl-minimal` to avoid conflicting with the
+ preinstalled curl package.
- The full JDK retains tools such as `jcmd`. The vendor and patch update can
change certificate trust and disabled algorithms; validate TLS, Kerberos and
BE JNI integrations before rollout.
@@ -143,7 +167,7 @@ certificates as production credentials.
## Updating and verifying dependencies
-`base-image/Dockerfile_base` pins the Ubuntu, Temurin 17, Temurin 8 and Go
+`base-image/Dockerfile_base` pins the Ubuntu, UBI 9, Temurin 17, Temurin 8 and
Go
multi-platform image digests, plus the doris-operator commit and source archive
SHA256. Update version and digest together, and update the source checksum
when changing the operator commit. Go's module checksum verification remains
@@ -154,7 +178,15 @@ enabled. The build keeps these inventories in each runtime
image:
APT uses HTTPS and package signature verification. The base build upgrades APT
first, upgrades all retained packages, and checks the minimum APT and OpenSSL
-patch versions. Cache cleanup alone does not apply security patches.
+patch versions for each supported Ubuntu release. The installer supports an
+explicit Ubuntu 22.04/Jammy override as well as the 26.04 default. When using
+Jammy, override the Ubuntu and JDK inputs together; for all-in-one or compose,
+override its Temurin input. UBI uses a separate `microdnf` installer, updates
+retained RPMs, and enables only the public UBI BaseOS and AppStream
repositories.
+The UBI installer restores the zoneinfo files removed from the minimal image,
+which BE needs at startup. Its inventory records RPM epoch, version, release
+and architecture. Cache
+cleanup alone does not apply security patches.
Refresh the pinned inputs regularly and rebuild the base with
`--pull --no-cache`; then rebuild every component against it. Rebuilding a
@@ -179,3 +211,23 @@ Operator debug mode, compute-group discovery, TLS and BE
JNI. Check final
image layers for the removed private keys. Findings in Doris application jars,
including shaded dependencies, require separate dependency updates; an OS or
JDK upgrade does not replace them.
+
+## Host and binary compatibility
+
+These are runtime images: the build scripts package existing Doris binaries
+and do not change their compiler or glibc baseline. The host uses the image's
+user-space libraries but supplies the kernel and CPU. A newer image can still
+require newer kernel interfaces or container-runtime syscall policies.
+
+UBI 9 on x86_64 requires **x86-64-v2**, including when selecting a Doris
+`x64-noavx2` archive. A no-AVX2 archive does not remove the UBI requirement.
+Ubuntu uses the ordinary `amd64` variant; this build does not opt into
+`amd64v3` packages. UBI 9's glibc 2.34 can be older than the environment where
+a custom Doris or JNI binary was built. Check all shipped native libraries,
+including JNI and FoundationDB, against the selected runtime.
+
+Before changing an existing deployment, validate its CPU features, kernel,
+Docker/containerd/runc and seccomp versions, and cgroup configuration. The
+Ubuntu 26.04 change in coreutils also requires exercising the shell entry
+points. Retain the previous 22.04 images for deployments whose host baseline
+has not been validated and for rollback. Do not repoint the old base-7.0 tags.
diff --git a/docker/runtime/all-in-one/4.1/Dockerfile
b/docker/runtime/all-in-one/4.1/Dockerfile
index ca0cc15830b..70cfe021090 100644
--- a/docker/runtime/all-in-one/4.1/Dockerfile
+++ b/docker/runtime/all-in-one/4.1/Dockerfile
@@ -43,7 +43,7 @@ ARG ARTIFACT_SOURCE=image
ARG FE_IMAGE=apache/doris:fe-${DORIS_VERSION}
ARG BE_IMAGE=apache/doris:be-${DORIS_VERSION}
ARG MS_IMAGE=apache/doris:ms-${DORIS_VERSION}
-ARG
BASE_IMAGE=eclipse-temurin:17.0.21_9-jre-jammy@sha256:aa6381384f8db99762fa7d0d3c2b5de58874e5f12c96df4c13a1455376ae0ed1
+ARG
BASE_IMAGE=eclipse-temurin:17.0.21_9-jre-resolute@sha256:2e6cde8b9d2138aa6393216ca79567095d0a63b1907f898a04cb4c2ddfb60e11
# ============================ artifact sources ==============================
# Two interchangeable ways to get fe/, be/ and ms/ into /artifacts. Everything
@@ -118,7 +118,7 @@ ENV DORIS_HOME=/opt/apache-doris \
COPY docker/runtime/base-image/install-runtime.sh /tmp/install-runtime.sh
RUN set -eux; \
- bash /tmp/install-runtime.sh mysql-client-core-8.0 curl tini procps
tzdata; \
+ bash /tmp/install-runtime.sh mysql-client-core curl tini procps tzdata; \
rm /tmp/install-runtime.sh; \
mkdir -p /usr/lib/jvm; \
ln -sfn "${JAVA_HOME}" /usr/lib/jvm/java; \
diff --git a/docker/runtime/all-in-one/4.1/README.md
b/docker/runtime/all-in-one/4.1/README.md
index 7514b487ac2..06760458ab0 100644
--- a/docker/runtime/all-in-one/4.1/README.md
+++ b/docker/runtime/all-in-one/4.1/README.md
@@ -82,7 +82,7 @@ anywhere. Run the script from anywhere.
## Runtime security
-The default base is a digest-pinned Temurin 17 JRE on Ubuntu 22.04. It provides
+The default base is a digest-pinned Temurin 17 JRE on Ubuntu 26.04 LTS. It
provides
the maintained JVM and CA bundle; the shared `base-image/install-runtime.sh`
updates APT first, upgrades retained packages over HTTPS, and records installed
versions at `/usr/share/doris/runtime-packages.tsv`. Binutils is installed only
@@ -91,7 +91,7 @@ packages or Operator tools.
For a security rebuild, refresh the pinned base and run `build.sh --no-cache`.
The script always checks for the selected base with `--pull`. Set `BASE_IMAGE`
-to an approved Jammy-based JRE image with `JAVA_HOME` and a CA bundle, and
+to an approved Ubuntu 26.04-based JRE image (or a Jammy JRE for rollback) with
`JAVA_HOME` and a CA bundle, and
`FE_IMAGE`, `BE_IMAGE`, and `MS_IMAGE` to published component references such
as `apache/doris@sha256:<digest>` when reproducible artifact inputs are needed.
These environment variables are forwarded as Docker build arguments.
diff --git a/docker/runtime/base-image/Dockerfile_base
b/docker/runtime/base-image/Dockerfile_base
index 4fac49ae324..2ef6b7f364b 100644
--- a/docker/runtime/base-image/Dockerfile_base
+++ b/docker/runtime/base-image/Dockerfile_base
@@ -17,15 +17,21 @@
# Build context: docker/runtime/base-image. Only the selected JDK and the
# rebuilt operator tools enter the runtime stage. Refresh these pins together.
-ARG
UBUNTU_IMAGE=ubuntu:22.04@sha256:9abcaffc92a5279fff3a6a41635c0800ea33e528425fb389658806476e7defde
-ARG
JDK17_IMAGE=eclipse-temurin:17.0.21_9-jdk-jammy@sha256:76751c16a2a07ec0960e659a2603491f8c79d95592173f6c0df8bf8ebab257cc
-ARG
JDK8_IMAGE=eclipse-temurin:8u512-b09-jdk-jammy@sha256:dfbb2839b4aa0f356ed4dc1025b2612ac0518de9c74fb6c32cf929856d8f5325
+ARG RUNTIME_DISTRO=ubuntu
+ARG
UBUNTU_IMAGE=ubuntu:26.04@sha256:d66b366dac61b575bee2aef07e9c26e8070096fbe84a3d4d3eb0da069b5d76db
+ARG
UBI9_IMAGE=registry.access.redhat.com/ubi9/ubi-minimal@sha256:d8162789d7913ef8941481687b92ab4bbec311870948f66cf52b9cc7e0c57c06
+ARG
JDK17_IMAGE=eclipse-temurin:17.0.21_9-jdk-resolute@sha256:c19b0e2ecdec69220c6c69e7fc7f4ab5b233ccfcce65f0b87c4411e71ca82fdc
+ARG
JDK8_IMAGE=eclipse-temurin:8u512-b09-jdk-resolute@sha256:6f51f7980d00eff8383ae5388c8baace9ef088382d4a198c0afedf0534873729
+ARG
JDK17_UBI9_IMAGE=eclipse-temurin:17.0.21_9-jdk-ubi9-minimal@sha256:a39aa77c3e2ca3e5987c87f38c238c8fdf230355c4f558d8002ac9e9e4fd86a7
+ARG
JDK8_UBI9_IMAGE=eclipse-temurin:8u512-b09-jdk-ubi9-minimal@sha256:bc58f23dc2e263a001a65129b1c626b09a16d6b49eca5ff18d06289a22cc598b
ARG
GO_IMAGE=golang:1.27.4-bookworm@sha256:4fa7c968ba93f1635670522dbb01a2c78150443e1385746924566079f36570ea
ARG JAVA_VERSION=17
-FROM ${JDK17_IMAGE} AS jdk-17
-FROM ${JDK8_IMAGE} AS jdk-8
-FROM jdk-${JAVA_VERSION} AS jdk
+FROM ${JDK17_IMAGE} AS jdk-ubuntu-17
+FROM ${JDK8_IMAGE} AS jdk-ubuntu-8
+FROM ${JDK17_UBI9_IMAGE} AS jdk-ubi9-17
+FROM ${JDK8_UBI9_IMAGE} AS jdk-ubi9-8
+FROM jdk-${RUNTIME_DISTRO}-${JAVA_VERSION} AS jdk
FROM --platform=$BUILDPLATFORM ${GO_IMAGE} AS debug-builder
ARG TARGETOS
@@ -49,21 +55,26 @@ RUN curl --fail --show-error --silent --location --proto
'=https' --tlsv1.2 \
go build -trimpath -o /out/dorisctl ./cmd/dorisctl && \
go version -m /out/doris-debug /out/dorisctl > /out/debug-tools.buildinfo
-FROM ${UBUNTU_IMAGE} AS runtime
-ARG JAVA_VERSION
-ENV JAVA_HOME=/usr/lib/jvm/java
-ENV PATH=${JAVA_HOME}/bin:${PATH}
-
+FROM ${UBUNTU_IMAGE} AS os-ubuntu
# Bootstrap HTTPS from the pinned JDK image before using APT. The installed
# ca-certificates package subsequently maintains this bundle.
COPY --from=jdk /etc/ssl/certs/ca-certificates.crt
/etc/ssl/certs/ca-certificates.crt
COPY install-runtime.sh /tmp/install-runtime.sh
RUN bash /tmp/install-runtime.sh && rm /tmp/install-runtime.sh
+FROM ${UBI9_IMAGE} AS os-ubi9
+COPY install-runtime-ubi9.sh /tmp/install-runtime-ubi9.sh
+RUN bash /tmp/install-runtime-ubi9.sh && rm /tmp/install-runtime-ubi9.sh
+
+FROM os-${RUNTIME_DISTRO} AS runtime
+ARG JAVA_VERSION
+ENV JAVA_HOME=/usr/lib/jvm/java
+ENV PATH=${JAVA_HOME}/bin:${PATH}
+
COPY --from=jdk /opt/java/openjdk /usr/lib/jvm/java
COPY --from=debug-builder /out/doris-debug /out/dorisctl /opt/apache-doris/
COPY --from=debug-builder /out/debug-tools.buildinfo /usr/share/doris/
RUN ln -s java "/usr/lib/jvm/jdk-${JAVA_VERSION}" && \
- java -version && mysql --version
+ java -version && mysql --version && test -f /usr/share/zoneinfo/UTC
WORKDIR /opt/apache-doris
diff --git a/docker/runtime/base-image/Dockerfile_base_slim
b/docker/runtime/base-image/Dockerfile_base_slim
index d84a881202c..26fd87ec261 100644
--- a/docker/runtime/base-image/Dockerfile_base_slim
+++ b/docker/runtime/base-image/Dockerfile_base_slim
@@ -19,5 +19,5 @@
# so both names use the same patched packages, selected JDK and operator tools.
# Build Dockerfile_base first, or supply its image through BASE_IMAGE.
ARG JAVA_VERSION=17
-ARG BASE_IMAGE=apache/doris:base-7.0-jdk${JAVA_VERSION}
+ARG BASE_IMAGE=apache/doris:base-8.0-ubuntu26.04-jdk${JAVA_VERSION}
FROM ${BASE_IMAGE}
diff --git a/docker/runtime/base-image/install-runtime-ubi9.sh
b/docker/runtime/base-image/install-runtime-ubi9.sh
new file mode 100644
index 00000000000..4e5841d5f86
--- /dev/null
+++ b/docker/runtime/base-image/install-runtime-ubi9.sh
@@ -0,0 +1,39 @@
+#!/usr/bin/env bash
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+set -euo pipefail
+
+# Keep builds independent of subscription repositories exposed by a RHEL host.
+repositories=(--disablerepo='*' --enablerepo=ubi-9-baseos-rpms
--enablerepo=ubi-9-appstream-rpms)
+microdnf "${repositories[@]}" update -y
+microdnf "${repositories[@]}" install -y --setopt=install_weak_deps=0 \
+ bash ca-certificates curl-minimal findutils fontconfig gawk
glibc-langpack-en \
+ grep gzip hostname iproute iputils jq libstdc++ mysql net-tools numactl \
+ openssl openssl-libs procps-ng sed tar tzdata util-linux wget which
+
+# UBI Minimal keeps tzdata in the RPM database but removes its zoneinfo files.
+# Installing an already-current RPM does not restore them; BE needs the files.
+microdnf "${repositories[@]}" reinstall -y tzdata
+ln -snf /usr/share/zoneinfo/UTC /etc/localtime
+test -f /usr/share/zoneinfo/UTC
+
+mkdir -p /usr/share/doris
+rpm -qa --qf '%{NAME}\t%{EPOCHNUM}:%{VERSION}-%{RELEASE}.%{ARCH}\n' \
+ | sort > /usr/share/doris/runtime-packages.tsv
+microdnf clean all
+rm -rf /var/cache/yum /var/cache/dnf
diff --git a/docker/runtime/base-image/install-runtime.sh
b/docker/runtime/base-image/install-runtime.sh
index 1dbd7171d72..97225ef6fa9 100644
--- a/docker/runtime/base-image/install-runtime.sh
+++ b/docker/runtime/base-image/install-runtime.sh
@@ -19,21 +19,54 @@
set -euo pipefail
export DEBIAN_FRONTEND=noninteractive
-sed -i 's|http://|https://|g' /etc/apt/sources.list
-apt-get update
+. /etc/os-release
+case "${VERSION_ID}" in
+ 22.04)
+ apt_sources=/etc/apt/sources.list
+ apt_library=libapt-pkg6.0
+ ssl_library=libssl3
+ mysql_client=mysql-client-core-8.0
+ apt_minimum=2.4.15ubuntu0.1
+ ssl_minimum=3.0.2-0ubuntu1.30
+ ;;
+ 26.04)
+ apt_sources=/etc/apt/sources.list.d/ubuntu.sources
+ apt_library=libapt-pkg7.0
+ ssl_library=libssl3t64
+ mysql_client=mysql-client-core
+ apt_minimum=3.2.1ubuntu0.1
+ ssl_minimum=3.5.5-1ubuntu3.7
+ ;;
+ *) echo "Unsupported Ubuntu runtime: ${VERSION_ID}" >&2; exit 1 ;;
+esac
+
+sed -i 's|http://|https://|g' "${apt_sources}"
+# Resolute's OpenSSL-based APT cannot discover the bootstrap bundle before
+# ca-certificates creates the default OpenSSL certificate paths.
+apt_options=(-o Acquire::https::CaInfo=/etc/ssl/certs/ca-certificates.crt)
+apt-get "${apt_options[@]}" update --error-on=any
# Patch the package manager before the remaining downloads (CVE-2026-109518).
-apt-get install -y --only-upgrade apt libapt-pkg6.0
-apt-get upgrade -y --with-new-pkgs
+apt-get "${apt_options[@]}" install -y --only-upgrade apt "${apt_library}"
+apt-get "${apt_options[@]}" upgrade -y --with-new-pkgs
# Component bases use this default set. Test images pass their own runtime or
# build-only packages so the same patch policy does not add unused tooling.
if [[ $# -eq 0 ]]; then
set -- curl fontconfig hostname iproute2 iputils-ping jq libstdc++6 \
- mysql-client-core-8.0 net-tools numactl openssl procps tzdata
util-linux wget
+ "${mysql_client}" net-tools numactl openssl procps tzdata util-linux
wget
fi
-apt-get install -y --no-install-recommends ca-certificates libssl3 "$@"
+# Accept the core-client name from either supported Ubuntu release so test
+# images and explicit Jammy overrides use the same installer.
+packages=()
+for package in "$@"; do
+ case "${package}" in
+ mysql-client-core|mysql-client-core-8.0) packages+=("${mysql_client}")
;;
+ *) packages+=("${package}") ;;
+ esac
+done
+apt-get "${apt_options[@]}" install -y --no-install-recommends ca-certificates
"${ssl_library}" "${packages[@]}"
-dpkg --compare-versions "$(dpkg-query -W -f='${Version}' apt)" ge
2.4.15ubuntu0.1
-dpkg --compare-versions "$(dpkg-query -W -f='${Version}' libssl3)" ge
3.0.2-0ubuntu1.30
+dpkg --compare-versions "$(dpkg-query -W -f='${Version}' apt)" ge
"${apt_minimum}"
+dpkg --compare-versions "$(dpkg-query -W -f='${Version}' "${ssl_library}")" ge
"${ssl_minimum}"
mkdir -p /usr/share/doris
dpkg-query -W -f='${Package}\t${Version}\n' | sort >
/usr/share/doris/runtime-packages.tsv
apt-get clean
diff --git a/docker/runtime/be/Dockerfile b/docker/runtime/be/Dockerfile
index c2042b74590..b099c6a1b26 100644
--- a/docker/runtime/be/Dockerfile
+++ b/docker/runtime/be/Dockerfile
@@ -27,7 +27,7 @@
# choose a base image
ARG JAVA_VERSION=17
-ARG BASE_IMAGE=apache/doris:base-7.0-jdk${JAVA_VERSION}
+ARG BASE_IMAGE=apache/doris:base-8.0-ubuntu26.04-jdk${JAVA_VERSION}
FROM ${BASE_IMAGE}
ARG TARGETARCH
diff --git a/docker/runtime/docker-build.sh b/docker/runtime/build-runtime.sh
old mode 100755
new mode 100644
similarity index 91%
copy from docker/runtime/docker-build.sh
copy to docker/runtime/build-runtime.sh
index e383284fe09..0aa410f9551
--- a/docker/runtime/docker-build.sh
+++ b/docker/runtime/build-runtime.sh
@@ -18,6 +18,8 @@
set -euo pipefail
+# Sourced by the Ubuntu and UBI 9 entry points.
+
usage() {
echo "Usage: $0 -v <version>"
echo "Build FE, BE and (when present) MS with a verified release archive."
@@ -47,7 +49,7 @@ if [[ ! "${version}" =~
^[0-9]+\.[0-9]+\.[0-9]+([-._][a-zA-Z0-9._-]+)?$ ]]; then
fi
runtime_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
-work_dir=${DORIS_IMAGE_WORK_DIR:-"${runtime_dir}/../../output/runtime-images"}
+work_dir=${DORIS_IMAGE_WORK_DIR:-"${runtime_dir}/../../output/runtime-images/${runtime_variant}"}
mkdir -p "${work_dir}"
work_dir=$(cd "${work_dir}" && pwd)
staging_dir=$(mktemp -d "${work_dir}/staging.XXXXXX")
@@ -70,7 +72,7 @@ java_version=8
if (( 10#${major_version} >= 3 )); then
java_version=17
fi
-base_image=${DORIS_BASE_IMAGE:-"apache/doris:base-7.0-jdk${java_version}"}
+base_image=${DORIS_BASE_IMAGE:-"apache/doris:base-8.0-${runtime_variant}-jdk${java_version}"}
package_name="apache-doris-${version}-bin-${url_arch}"
archive_name="${package_name}.tar.gz"
download_base=${DORIS_DOWNLOAD_BASE_URL:-https://apache-doris-releases.oss-accelerate.aliyuncs.com}
@@ -113,8 +115,8 @@ fi
echo "Verified SHA512 for ${archive_name}"
tar -xzf "${archive}" -C "${staging_dir}"
-base_args=(--build-arg "JAVA_VERSION=${java_version}")
-for arg in UBUNTU_IMAGE JDK17_IMAGE JDK8_IMAGE GO_IMAGE; do
+base_args=(--build-arg "JAVA_VERSION=${java_version}" --build-arg
"RUNTIME_DISTRO=${runtime_distro}")
+for arg in UBUNTU_IMAGE UBI9_IMAGE JDK17_IMAGE JDK8_IMAGE JDK17_UBI9_IMAGE
JDK8_UBI9_IMAGE GO_IMAGE; do
if [[ -n "${!arg:-}" ]]; then
base_args+=(--build-arg "${arg}=${!arg}")
fi
@@ -133,7 +135,7 @@ for role in fe be ms; do
cp "${runtime_dir}/${role}/Dockerfile" "${context}/Dockerfile"
cp "${runtime_dir}/${role}/resource/"*.sh "${context}/resource/"
mv "${staging_dir}/${package_name}/${role}"
"${context}/resource/${arch}/${package_name}/"
- image="${DORIS_IMAGE_PREFIX:-doris}.${role}:${version}"
+
image="${DORIS_IMAGE_PREFIX:-doris}.${role}:${version}${DORIS_IMAGE_TAG_SUFFIX-${runtime_tag_suffix}}"
docker build --no-cache --platform "linux/${arch}" \
--build-arg "BASE_IMAGE=${base_image}" --build-arg
"JAVA_VERSION=${java_version}" \
--build-arg "DORIS_VERSION=${version}" -t "${image}" "${context}"
diff --git a/docker/runtime/base-image/Dockerfile_base_slim
b/docker/runtime/docker-build-ubi9.sh
old mode 100644
new mode 100755
similarity index 70%
copy from docker/runtime/base-image/Dockerfile_base_slim
copy to docker/runtime/docker-build-ubi9.sh
index d84a881202c..31e557a9bcb
--- a/docker/runtime/base-image/Dockerfile_base_slim
+++ b/docker/runtime/docker-build-ubi9.sh
@@ -1,3 +1,4 @@
+#!/usr/bin/env bash
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
@@ -15,9 +16,9 @@
# specific language governing permissions and limitations
# under the License.
-# The default base is now minimal. Keep the slim build entry point as an alias
-# so both names use the same patched packages, selected JDK and operator tools.
-# Build Dockerfile_base first, or supply its image through BASE_IMAGE.
-ARG JAVA_VERSION=17
-ARG BASE_IMAGE=apache/doris:base-7.0-jdk${JAVA_VERSION}
-FROM ${BASE_IMAGE}
+set -euo pipefail
+
+runtime_distro=ubi9
+runtime_variant=ubi9
+runtime_tag_suffix='-ubi9'
+source "$(dirname "${BASH_SOURCE[0]}")/build-runtime.sh" "$@"
diff --git a/docker/runtime/docker-build.sh b/docker/runtime/docker-build.sh
index e383284fe09..0c82f37f9bb 100755
--- a/docker/runtime/docker-build.sh
+++ b/docker/runtime/docker-build.sh
@@ -18,124 +18,7 @@
set -euo pipefail
-usage() {
- echo "Usage: $0 -v <version>"
- echo "Build FE, BE and (when present) MS with a verified release archive."
- echo "See docker/runtime/README.md for architecture and artifact
overrides."
-}
-
-version=
-while [[ $# -gt 0 ]]; do
- case "$1" in
- -v|--version)
- version=${2:?Missing version}
- shift 2
- ;;
- -h|--help)
- usage
- exit 0
- ;;
- *)
- usage >&2
- exit 1
- ;;
- esac
-done
-if [[ ! "${version}" =~ ^[0-9]+\.[0-9]+\.[0-9]+([-._][a-zA-Z0-9._-]+)?$ ]];
then
- usage >&2
- exit 1
-fi
-
-runtime_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
-work_dir=${DORIS_IMAGE_WORK_DIR:-"${runtime_dir}/../../output/runtime-images"}
-mkdir -p "${work_dir}"
-work_dir=$(cd "${work_dir}" && pwd)
-staging_dir=$(mktemp -d "${work_dir}/staging.XXXXXX")
-trap 'rm -rf "$staging_dir"' EXIT
-
-case "${DORIS_ARCH:-$(uname -m)}" in
- amd64|x86_64) arch=amd64; url_arch=x64 ;;
- arm64|aarch64) arch=arm64; url_arch=arm64 ;;
- *) echo "Unsupported architecture" >&2; exit 1 ;;
-esac
-if [[ "${arch}" == amd64 ]]; then
- if [[ "${DORIS_NO_AVX2:-0}" == 1 ]] || \
- { [[ "$(uname -m)" == x86_64 && -f /proc/cpuinfo ]] && ! grep -qw avx2
/proc/cpuinfo; }; then
- url_arch=x64-noavx2
- fi
-fi
-
-major_version=${version%%.*}
-java_version=8
-if (( 10#${major_version} >= 3 )); then
- java_version=17
-fi
-base_image=${DORIS_BASE_IMAGE:-"apache/doris:base-7.0-jdk${java_version}"}
-package_name="apache-doris-${version}-bin-${url_arch}"
-archive_name="${package_name}.tar.gz"
-download_base=${DORIS_DOWNLOAD_BASE_URL:-https://apache-doris-releases.oss-accelerate.aliyuncs.com}
-expected_sha512=${DORIS_ARCHIVE_SHA512:-}
-
-# Read only the checksum, not paths or commands from the checksum document.
-if [[ -z "${expected_sha512}" ]]; then
- curl --fail --show-error --location --retry 3 --proto '=https'
--proto-redir '=https' \
- --tlsv1.2 "${download_base}/${archive_name}.sha512" -o
"${staging_dir}/archive.sha512"
- expected_sha512=$(awk '{
- for (i = 1; i <= NF; i++) {
- if (length($i) == 128 && $i !~ /[^0-9a-fA-F]/) {
- print tolower($i)
- count++
- }
- }
- } END { if (count != 1) exit 1 }' "${staging_dir}/archive.sha512")
-fi
-if [[ ! "${expected_sha512}" =~ ^[a-fA-F0-9]{128}$ ]]; then
- echo "Expected exactly one SHA512 digest for ${archive_name}" >&2
- exit 1
-fi
-archive=${DORIS_ARCHIVE:-"${work_dir}/${archive_name}"}
-if [[ -z "${DORIS_ARCHIVE:-}" ]]; then
- curl --fail --show-error --location --retry 3 --proto '=https'
--proto-redir '=https' \
- --tlsv1.2 "${download_base}/${archive_name}" -o "${archive}.part"
- mv "${archive}.part" "${archive}"
-fi
-if command -v sha512sum >/dev/null 2>&1; then
- actual_sha512=$(sha512sum "${archive}")
-else
- actual_sha512=$(shasum -a 512 "${archive}")
-fi
-actual_sha512=${actual_sha512%% *}
-expected_sha512=$(printf '%s' "${expected_sha512}" | tr '[:upper:]'
'[:lower:]')
-if [[ "${actual_sha512}" != "${expected_sha512}" ]]; then
- echo "SHA512 verification failed for ${archive}" >&2
- exit 1
-fi
-echo "Verified SHA512 for ${archive_name}"
-tar -xzf "${archive}" -C "${staging_dir}"
-
-base_args=(--build-arg "JAVA_VERSION=${java_version}")
-for arg in UBUNTU_IMAGE JDK17_IMAGE JDK8_IMAGE GO_IMAGE; do
- if [[ -n "${!arg:-}" ]]; then
- base_args+=(--build-arg "${arg}=${!arg}")
- fi
-done
-docker build --pull --no-cache --platform "linux/${arch}" \
- "${base_args[@]}" \
- -t "${base_image}" -f "${runtime_dir}/base-image/Dockerfile_base"
"${runtime_dir}/base-image"
-
-# Consume the base just built. --pull here would fetch a registry tag instead.
-for role in fe be ms; do
- if [[ "${role}" == ms && ! -d "${staging_dir}/${package_name}/ms" ]]; then
- continue
- fi
- context="${staging_dir}/${role}"
- mkdir -p "${context}/resource/${arch}/${package_name}"
- cp "${runtime_dir}/${role}/Dockerfile" "${context}/Dockerfile"
- cp "${runtime_dir}/${role}/resource/"*.sh "${context}/resource/"
- mv "${staging_dir}/${package_name}/${role}"
"${context}/resource/${arch}/${package_name}/"
- image="${DORIS_IMAGE_PREFIX:-doris}.${role}:${version}"
- docker build --no-cache --platform "linux/${arch}" \
- --build-arg "BASE_IMAGE=${base_image}" --build-arg
"JAVA_VERSION=${java_version}" \
- --build-arg "DORIS_VERSION=${version}" -t "${image}" "${context}"
- docker image inspect "${image}" >
"${work_dir}/${role}-${version}-${arch}.image.json"
-done
+runtime_distro=ubuntu
+runtime_variant=ubuntu26.04
+runtime_tag_suffix=''
+source "$(dirname "${BASH_SOURCE[0]}")/build-runtime.sh" "$@"
diff --git a/docker/runtime/doris-compose/Dockerfile
b/docker/runtime/doris-compose/Dockerfile
index af75485ddec..b11cead401d 100644
--- a/docker/runtime/doris-compose/Dockerfile
+++ b/docker/runtime/doris-compose/Dockerfile
@@ -17,7 +17,7 @@
# Build context: the repository root. For an external release directory use
# --build-context doris-output=<directory> --build-arg ARTIFACT_SOURCE=dir.
-ARG
JDK_IMAGE=eclipse-temurin:17.0.21_9-jdk-jammy@sha256:76751c16a2a07ec0960e659a2603491f8c79d95592173f6c0df8bf8ebab257cc
+ARG
JDK_IMAGE=eclipse-temurin:17.0.21_9-jdk-resolute@sha256:c19b0e2ecdec69220c6c69e7fc7f4ab5b233ccfcce65f0b87c4411e71ca82fdc
ARG OUTPUT_PATH=./output
ARG ARTIFACT_SOURCE=context
ARG JACOCO_VERSION=0.8.16
@@ -62,7 +62,7 @@ FROM ${JDK_IMAGE} AS runtime-base
ARG JACOCO_VERSION
ENV JACOCO_VERSION=${JACOCO_VERSION}
COPY docker/runtime/base-image/install-runtime.sh /tmp/install-runtime.sh
-RUN bash /tmp/install-runtime.sh mysql-client-core-8.0 python-is-python3 lsof \
+RUN bash /tmp/install-runtime.sh mysql-client-core python-is-python3 lsof \
tzdata curl xz-utils jq procps util-linux gosu && \
rm /tmp/install-runtime.sh && \
ln -fs /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \
diff --git a/docker/runtime/fe/Dockerfile b/docker/runtime/fe/Dockerfile
index f1899aff1ec..d6bbe9634d2 100644
--- a/docker/runtime/fe/Dockerfile
+++ b/docker/runtime/fe/Dockerfile
@@ -26,7 +26,7 @@
# get the binary from doris github and utar into resource, update the
directory as apache-`version(example:2.0.1)`-bin-`architecture(amd64/arm64)`
mode.
ARG JAVA_VERSION=17
-ARG BASE_IMAGE=apache/doris:base-7.0-jdk${JAVA_VERSION}
+ARG BASE_IMAGE=apache/doris:base-8.0-ubuntu26.04-jdk${JAVA_VERSION}
FROM ${BASE_IMAGE} AS artifacts
ARG TARGETARCH
diff --git a/docker/runtime/ms/Dockerfile b/docker/runtime/ms/Dockerfile
index 11db81a2a49..a82636608ce 100644
--- a/docker/runtime/ms/Dockerfile
+++ b/docker/runtime/ms/Dockerfile
@@ -27,7 +27,7 @@
# choose a base image
ARG JAVA_VERSION=17
-ARG BASE_IMAGE=apache/doris:base-7.0-jdk${JAVA_VERSION}
+ARG BASE_IMAGE=apache/doris:base-8.0-ubuntu26.04-jdk${JAVA_VERSION}
FROM ${BASE_IMAGE}
ARG TARGETARCH
diff --git a/docker/runtime/tests/test_docker_build.py
b/docker/runtime/tests/test_docker_build.py
index 49cc2946fd9..7cef62a9de2 100644
--- a/docker/runtime/tests/test_docker_build.py
+++ b/docker/runtime/tests/test_docker_build.py
@@ -93,8 +93,9 @@ class RuntimeBuildTest(BuildFixture, unittest.TestCase):
archive.addfile(info, io.BytesIO(data))
return path, hashlib.sha512(path.read_bytes()).hexdigest()
- def build(self, archive, digest, version="4.1.5", **overrides):
+ def build(self, archive, digest, version="4.1.5",
script="docker-build.sh", **overrides):
env = dict(os.environ)
+ env.pop("DORIS_IMAGE_TAG_SUFFIX", None)
env.update(
PATH=f"{self.bin}:{env['PATH']}",
DOCKER_CALLS=str(self.calls),
@@ -107,7 +108,7 @@ class RuntimeBuildTest(BuildFixture, unittest.TestCase):
)
env.update(overrides)
return subprocess.run(
- ["bash", str(RUNTIME / "docker-build.sh"), "-v", version],
+ ["bash", str(RUNTIME / script), "-v", version],
cwd=self.work, env=env, text=True, capture_output=True,
check=False, timeout=30,
)
@@ -128,13 +129,62 @@ class RuntimeBuildTest(BuildFixture, unittest.TestCase):
self.assertEqual(json.loads(record.read_text())[0]["Id"],
"sha256:fixture")
self.assertFalse(list((self.work / "build").glob("staging.*")))
+ def
test_ubi9_build_selects_its_base_and_keeps_tags_and_metadata_separate(self):
+ archive, digest = self.archive()
+ checkout = self.work / "checkout"
+ runtime = checkout / "docker/runtime"
+ runtime.mkdir(parents=True)
+ for script in ["docker-build.sh", "docker-build-ubi9.sh",
"build-runtime.sh"]:
+ (runtime / script).write_text((RUNTIME / script).read_text())
+ for role in ["fe", "be", "ms"]:
+ (runtime / role / "resource").mkdir(parents=True)
+ (runtime / role / "Dockerfile").write_text((RUNTIME / role /
"Dockerfile").read_text())
+ for script in (RUNTIME / role / "resource").glob("*.sh"):
+ (runtime / role / "resource" /
script.name).write_text(script.read_text())
+ for script, variant, suffix, distro in [
+ ("docker-build.sh", "ubuntu26.04", "", "ubuntu"),
+ ("docker-build-ubi9.sh", "ubi9", "-ubi9", "ubi9"),
+ ]:
+ with self.subTest(script=script):
+ self.calls.unlink(missing_ok=True)
+ result = self.build(archive, digest, script=str(runtime /
script),
+ DORIS_BASE_IMAGE="",
DORIS_IMAGE_WORK_DIR="")
+ self.assertEqual(result.returncode, 0, result.stderr)
+ builds = [call["args"] for call in self.read_calls() if
call["args"][0] == "build"]
+ base = f"apache/doris:base-8.0-{variant}-jdk17"
+ self.assertIn(base, builds[0])
+ self.assertIn(f"RUNTIME_DISTRO={distro}", builds[0])
+ for role, args in zip(["fe", "be", "ms"], builds[1:]):
+ self.assertIn(f"BASE_IMAGE={base}", args)
+ self.assertIn(f"runtime-test.{role}:4.1.5{suffix}", args)
+ record = checkout / "output/runtime-images" / variant /
f"{role}-4.1.5-arm64.image.json"
+ self.assertEqual(json.loads(record.read_text())[0]["Id"],
"sha256:fixture")
+ record.unlink()
+
+ def test_ubi9_keeps_java8_and_custom_tags_and_forwards_pinned_inputs(self):
+ archive, digest = self.archive("2.1.9", "x64-noavx2", include_ms=False)
+ inputs = {key: f"registry.example/{key.lower()}@sha256:" + "a" * 64
+ for key in ["UBI9_IMAGE", "JDK17_UBI9_IMAGE",
"JDK8_UBI9_IMAGE", "GO_IMAGE"]}
+ result = self.build(archive, digest, version="2.1.9",
script="docker-build-ubi9.sh",
+ DORIS_ARCH="amd64", DORIS_NO_AVX2="1",
DORIS_IMAGE_TAG_SUFFIX="-custom",
+ **inputs)
+ self.assertEqual(result.returncode, 0, result.stderr)
+ builds = [call["args"] for call in self.read_calls() if
call["args"][0] == "build"]
+ self.assertEqual(len(builds), 3)
+ self.assertIn("JAVA_VERSION=8", builds[0])
+ for key, value in inputs.items():
+ self.assertIn(f"{key}={value}", builds[0])
+ self.assertIn("runtime-test.be:2.1.9-custom", builds[2])
+
def test_checksum_mismatch_stops_before_extracting_or_building(self):
archive, _ = self.archive()
- result = self.build(archive, "0" * 128)
- self.assertNotEqual(result.returncode, 0)
- self.assertIn("SHA512 verification failed", result.stderr)
- self.assertFalse(self.calls.exists())
- self.assertFalse(list((self.work / "build").glob("staging.*")))
+ for script in ["docker-build.sh", "docker-build-ubi9.sh"]:
+ with self.subTest(script=script):
+ result = self.build(archive, "0" * 128, script=script)
+ self.assertNotEqual(result.returncode, 0)
+ self.assertIn("SHA512 verification failed", result.stderr)
+ self.assertFalse(self.calls.exists())
+ self.assertFalse(list((self.work / "build").glob("staging.*")))
def test_legacy_release_uses_java8_and_does_not_require_ms(self):
archive, digest = self.archive("2.1.9", "x64-noavx2", include_ms=False)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]