Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 11 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
ARG LATEST_VERSION
ARG ALL_JDK_STAGE=all-jdk-amd64
ARG FULL_STAGE=full-amd64
FROM eclipse-temurin:${LATEST_VERSION}-jdk-resolute AS temurin-latest
FROM amazoncorretto:${LATEST_VERSION} AS corretto-latest

# Intermediate image used to prune cruft from JDKs and squash them all.
FROM ubuntu:resolute AS all-jdk-common
Expand Down Expand Up @@ -55,12 +55,12 @@ EOT

ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8'

COPY --from=eclipse-temurin:8-jdk-resolute /opt/java/openjdk /usr/lib/jvm/8
COPY --from=eclipse-temurin:11-jdk-resolute /opt/java/openjdk /usr/lib/jvm/11
COPY --from=eclipse-temurin:17-jdk-resolute /opt/java/openjdk /usr/lib/jvm/17
COPY --from=eclipse-temurin:21-jdk-resolute /opt/java/openjdk /usr/lib/jvm/21
COPY --from=eclipse-temurin:25-jdk-resolute /opt/java/openjdk /usr/lib/jvm/25
COPY --from=temurin-latest /opt/java/openjdk /usr/lib/jvm/${LATEST_VERSION}
COPY --from=amazoncorretto:8 /usr/lib/jvm/java-1.8.0-amazon-corretto /usr/lib/jvm/8
COPY --from=amazoncorretto:11 /usr/lib/jvm/java-11-amazon-corretto /usr/lib/jvm/11
COPY --from=amazoncorretto:17 /usr/lib/jvm/java-17-amazon-corretto /usr/lib/jvm/17
COPY --from=amazoncorretto:21 /usr/lib/jvm/java-21-amazon-corretto /usr/lib/jvm/21
COPY --from=amazoncorretto:25 /usr/lib/jvm/java-25-amazon-corretto /usr/lib/jvm/25
COPY --from=corretto-latest /usr/lib/jvm/java-${LATEST_VERSION}-amazon-corretto /usr/lib/jvm/${LATEST_VERSION}
# Java 28 TODO: remove following line after GA
COPY --from=openjdk:28-ea-jdk-bookworm /usr/local/openjdk-28 /usr/lib/jvm/28

Expand All @@ -73,7 +73,7 @@ COPY --from=ibm-semeru-runtimes:open-17-jdk-resolute /opt/java/openjdk /usr/lib/

COPY --from=ghcr.io/graalvm/native-image-community:17-ol9 /usr/lib64/graalvm/graalvm-community-java17 /usr/lib/jvm/graalvm17
COPY --from=ghcr.io/graalvm/native-image-community:21-ol9 /usr/lib64/graalvm/graalvm-community-java21 /usr/lib/jvm/graalvm21
COPY --from=ghcr.io/graalvm/native-image-community:25-ol10 /usr/lib64/graalvm/graalvm-community-java25 /usr/lib/jvm/graalvm25
COPY --from=ghcr.io/graalvm/native-image-community:25i5-25.0.5.0.3-ol10 /usr/lib64/graalvm/graalvm-community-java25i5 /usr/lib/jvm/graalvm25

# See:
# 1. Oracle docimention about script friendly download: https://docs.oracle.com/en-us/iaas/jms/doc/script-friendly-download.html
Expand Down Expand Up @@ -184,6 +184,9 @@ ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8'

COPY --from=default-jdk /usr/lib/jvm /usr/lib/jvm

# Corretto's truststore symlinks point outside the copied JDK directories.
COPY --from=corretto-latest /etc/pki/ca-trust/extracted/java/cacerts /etc/pki/java/cacerts

# Install the following tools
# - awscli: AWS CLI
# - datadog-ci: Datadog CI tool
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ This repository holds the original Docker images for continuous integration jobs
Pre-built images are available in the [GitHub Container Registry](https://github.com/DataDog/dd-trace-java-docker-build/pkgs/container/dd-trace-java-docker-build).

Image variants are available on a per JDK basis:
- The `base` variant and its aliases — `8`, `11`, `17`, `21`, `25`, and `tip` — contain the base Eclipse Temurin JDK 8, 11, 17, 21, 25, and 27 releases. The `tip` alias currently refers to JDK 27.
- The `base` variant and its aliases - `8`, `11`, `17`, `21`, `25`, and `tip` - contain the base Amazon Corretto JDK 8, 11, 17, 21, 25, and 27 releases. The `tip` alias currently refers to JDK 27.
- The `zulu8`, `zulu11`, `oracle8`, `ibm8`, `semeru8`, `semeru11`, `semeru17`, `graalvm17`, `graalvm21`, and `graalvm25` variants each contain the base JDKs in addition to the specific JDK from their name.
- The `latest` variant contains the base JDKs and all of the specific JDKs above.
- EA JDK `28` is currently being tested. <!-- Java 28 TODO: remove this line after GA -->
Expand All @@ -17,7 +17,7 @@ The `7` and `ibm8` variants are amd64-only because the upstream JDK images are n
`docker pull` for those tags on arm64 will fail.

Images are tagged with `ci-` prefixes via the [Tag new images version](https://github.com/DataDog/dd-trace-java-docker-build/actions/workflows/docker-tag.yml) workflow, which runs quarterly on `master` and when manually triggered.
A **48-hour cooldown** is enforced: the workflow verifies that all external upstream dependencies (Eclipse Temurin, Azul Zulu, IBM Semeru, GraalVM, etc.) referenced in the Dockerfile were built at least 48 hours ago before tagging.
A **48-hour cooldown** is enforced: the workflow verifies that all external upstream dependencies (Amazon Corretto, Azul Zulu, IBM Semeru, GraalVM, etc.) referenced in the Dockerfile were built at least 48 hours ago before tagging.
This ensures that upstream images have had sufficient time for vulnerability scans and community review before being CI use. On completion, it automatically triggers the [Update mirror digests for ci-* images](https://github.com/DataDog/dd-trace-java-docker-build/actions/workflows/update-mirror-digests.yml) workflow,
which opens a PR in [ddoghq/images](https://github.com/ddoghq/images) updating the pinned `ci-*` mirror image digests.
Once that PR is merged, `dd-trace-java` CI picks up the updated images from `registry.ddbuild.io`. Images are mirrored in `registry.ddbuild.io` to ensure they are signed before use in CI.
Expand Down Expand Up @@ -57,4 +57,4 @@ To test these images in `dd-trace-java` CI:
5. When the test images look good and `DataDog/dd-trace-java` CI is green, merge your `DataDog/dd-trace-java-docker-build` PR #N.
6. Close the test `DataDog/dd-trace-java` PR.
7. Run the [Delete test image mirror PR](https://github.com/DataDog/dd-trace-java-docker-build/actions/workflows/delete-test-mirror-pr.yml) workflow with `N` to remove the `N_merge-*` images from `ddoghq/images`. Confirm that this PR is approved and merged by the `dd-prapprover` bot.
8. Finally, run the [Tag new images version](https://github.com/DataDog/dd-trace-java-docker-build/actions/workflows/docker-tag.yml) workflow. **Note:** The workflow enforces a 48-hour cooldown on external upstream dependencies — it will fail if any upstream image (Eclipse Temurin, Azul Zulu, IBM Semeru, GraalVM, etc.) was rebuilt less than 48 hours ago. If the workflow fails, check the logs to see which dependency is too new, and retry after the cooldown has elapsed. This check can also be skipped when manually triggering the workflow. On success, the [Update mirror digests for ci-* images](https://github.com/DataDog/dd-trace-java-docker-build/actions/workflows/update-mirror-digests.yml) workflow will automatically open a PR in `ddoghq/images`, updating the pinned `ci-*` digests. `dd-trace-java` CI should automatically pick up these updated images a few minutes after the PR is merged.
8. Finally, run the [Tag new images version](https://github.com/DataDog/dd-trace-java-docker-build/actions/workflows/docker-tag.yml) workflow. **Note:** The workflow enforces a 48-hour cooldown on external upstream dependencies - it will fail if any upstream image (Amazon Corretto, Azul Zulu, IBM Semeru, GraalVM, etc.) was rebuilt less than 48 hours ago. If the workflow fails, check the logs to see which dependency is too new, and retry after the cooldown has elapsed. This check can also be skipped when manually triggering the workflow. On success, the [Update mirror digests for ci-* images](https://github.com/DataDog/dd-trace-java-docker-build/actions/workflows/update-mirror-digests.yml) workflow will automatically open a PR in `ddoghq/images`, updating the pinned `ci-*` digests. `dd-trace-java` CI should automatically pick up these updated images a few minutes after the PR is merged.
Loading