Skip to content

[fix](docker) Restore standalone runtime image builds - #71044

Closed
morningman wants to merge 1 commit into
apache:masterfrom
morningman:fix/standalone-runtime-image-builds
Closed

morningman wants to merge 1 commit into
apache:masterfrom
morningman:fix/standalone-runtime-image-builds

Conversation

@morningman

Copy link
Copy Markdown
Contributor

Background

Doris component Dockerfiles package existing FE, BE and MS binaries.
The Ubuntu and UBI release build scripts build a base image and supply it
to the component Dockerfiles. CI and downstream packagers can also call
the component Dockerfiles directly with their own release archives.

What problem does this PR solve?

Issue Number: None
Related PR: #70662 (introduced the unpublished base default), #70770 (changed the default tag)
PR Type: Bugfix

Problem Summary:

A standalone component build with only DORIS_VERSION tries to pull the
unpublished apache/doris:base-8.0-ubuntu26.04-jdk17 tag. For example, with
a 4.1.9 release-layout fixture in the FE context, run:

docker buildx build --platform linux/arm64 --build-arg DORIS_VERSION=4.1.9 docker/runtime/fe

BuildKit reports docker.io/apache/doris:base-8.0-ubuntu26.04-jdk17: not found
on the baseline. The same build completes with a runnable Java 17 after
the fix.

Details

  • Frequency: Always when building a component with the default base and Docker Hub cannot supply the tag.
  • Root cause: Each component Dockerfile uses the tag generated by the release build helper as its implicit base. A direct build needs to resolve that tag before it can copy the release files.
  • Why existing tests missed it: test_docker_build.py stubs Docker and checks the explicit base passed by the release scripts. The Doris regression suites exercise running clusters.
  • Fix: Use the published base-6.0 index, pinned by digest, for standalone builds. Its stage selects Java by release version or an explicit JAVA_VERSION. BuildKit skips this stage when the caller supplies BASE_IMAGE.
  • Other paths and branches: FE, BE and MS share the failure. All-in-one and compose use their own bases. The local 4.1 and 4.2 backport branches of [improvement](docker) Harden runtime image dependencies and packaging #70662 carry the same pattern with the earlier 7.0 tag. The inspected Apache 3.1, 4.0, 4.1 and 4.2 tracking refs use earlier defaults.
  • Behavior change: The standalone compatibility path inherits the older OS and JDK layers. The Ubuntu and UBI release scripts explicitly supply their hardened bases.

Testing

  • Reproduced the missing tag with an ARM64 FE fixture on 6261b18dc35. The patched build copied the fixture, pruned FE's bundled artifacts and ran Java 17.
  • Built ARM64 FE, BE and MS and AMD64 FE with the default base. Verified Java 8 selection and override, and checked the error for an unsupported JDK.
  • Built all three ARM64 components with explicit Ubuntu 26.04 and UBI 9 bases. The FE layer checker passed for both.
  • All ten cases in docker/runtime/tests/test_docker_build.py passed locally.

Release note

Standalone FE, BE and MS Dockerfile builds can use the published compatibility base without a separate base build.

Check List (For Author)

  • Behavior changed: Yes (see Details)
  • Does this need documentation: No. The runtime README documents the compatibility and hardened build options.
  • Pre-submission status: Partially verified: local tests used release-layout fixtures. Full release payloads and cluster startup were not exercised.

AI Disclosure

  • Tool: Codex (GPT-6)
  • Generated: Dockerfile changes, README, local verification fixture, and description
  • Human review: not stated

### Background

Doris component Dockerfiles package existing FE, BE and MS binaries.
The Ubuntu and UBI release build scripts build a base image and supply it
to the component Dockerfiles. CI and downstream packagers can also call
the component Dockerfiles directly with their own release archives.

### What problem does this PR solve?

Issue Number: None
Related PR: apache#70662 (introduced the unpublished base default), apache#70770 (changed the default tag)
PR Type: Bugfix

Problem Summary:

A standalone component build with only `DORIS_VERSION` tries to pull the
unpublished `apache/doris:base-8.0-ubuntu26.04-jdk17` tag. For example, with
a 4.1.9 release-layout fixture in the FE context, run:

```sh
docker buildx build --platform linux/arm64 --build-arg DORIS_VERSION=4.1.9 docker/runtime/fe
```

BuildKit reports `docker.io/apache/doris:base-8.0-ubuntu26.04-jdk17: not found`
on the baseline. The same build completes with a runnable Java 17 after
the fix.

### Details

- **Frequency:** Always when building a component with the default base and Docker Hub cannot supply the tag.
- **Root cause:** Each component Dockerfile uses the tag generated by the release build helper as its implicit base. A direct build needs to resolve that tag before it can copy the release files.
- **Why existing tests missed it:** `test_docker_build.py` stubs Docker and checks the explicit base passed by the release scripts. The Doris regression suites exercise running clusters.
- **Fix:** Use the published `base-6.0` index, pinned by digest, for standalone builds. Its stage selects Java by release version or an explicit `JAVA_VERSION`. BuildKit skips this stage when the caller supplies `BASE_IMAGE`.
- **Other paths and branches:** FE, BE and MS share the failure. All-in-one and compose use their own bases. The local 4.1 and 4.2 backport branches of apache#70662 carry the same pattern with the earlier 7.0 tag. The inspected Apache 3.1, 4.0, 4.1 and 4.2 tracking refs use earlier defaults.
- **Behavior change:** The standalone compatibility path inherits the older OS and JDK layers. The Ubuntu and UBI release scripts explicitly supply their hardened bases.

### Testing

- Reproduced the missing tag with an ARM64 FE fixture on `6261b18dc35`. The patched build copied the fixture, pruned FE's bundled artifacts and ran Java 17.
- Built ARM64 FE, BE and MS and AMD64 FE with the default base. Verified Java 8 selection and override, and checked the error for an unsupported JDK.
- Built all three ARM64 components with explicit Ubuntu 26.04 and UBI 9 bases. The FE layer checker passed for both.
- All ten cases in `docker/runtime/tests/test_docker_build.py` passed locally.

### Release note

Standalone FE, BE and MS Dockerfile builds can use the published compatibility base without a separate base build.

### Check List (For Author)

- Behavior changed: Yes (see Details)
- Does this need documentation: No. The runtime README documents the compatibility and hardened build options.
- Pre-submission status: Partially verified: local tests used release-layout fixtures. Full release payloads and cluster startup were not exercised.

### AI Disclosure

- Tool: Codex (GPT-6)
- Generated: Dockerfile changes, README, local verification fixture, and description
- Human review: not stated
@morningman
morningman marked this pull request as draft November 26, 2026 02:02
@morningman morningman closed this Nov 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant