Skip to content

Commit 69021ed

Browse files
debug 1
1 parent af8d757 commit 69021ed

File tree

1 file changed

+16
-13
lines changed

1 file changed

+16
-13
lines changed

Dockerfile

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
11
# syntax=docker/dockerfile:1.6
22

3+
FROM ubuntu:latest AS oracle8
4+
# See: Oracle docimention about script friendly download: https://docs.oracle.com/en-us/iaas/jms/doc/script-friendly-download.html
5+
# Note:
6+
# 1. Token can be created here: https://cloud.oracle.com/?tenant=ddsbxplayground&domain=datadog&region=us-ashburn-1
7+
# 2. Once created, token should be added to GitHub protected environment by repository administrator.
8+
RUN id non-root-user
9+
RUN --mount=type=secret,id=oracle_java8_token <<-EOT
10+
set -eux
11+
sudo mkdir -p /usr/lib/jvm/oracle8
12+
# turn off tracing before touching secrets
13+
set +x
14+
sudo ORACLE_JAVA8_TOKEN="$(cat /run/secrets/oracle_java8_token)"
15+
sudo curl -L --fail -H "token:${ORACLE_JAVA8_TOKEN}" https://java.oraclecloud.com/java/8/latest/jdk-8-linux-x64_bin.tar.gz | sudo tar -xvzf - -C /usr/lib/jvm/oracle8 --strip-components 1
16+
unset ORACLE_JAVA8_TOKEN
17+
EOT
18+
319
ARG LATEST_VERSION
420
FROM eclipse-temurin:${LATEST_VERSION}-jdk-noble AS temurin-latest
521

@@ -67,19 +83,6 @@ COPY --from=ghcr.io/graalvm/native-image-community:17-ol9 /usr/lib64/graalvm/gra
6783
COPY --from=ghcr.io/graalvm/native-image-community:21-ol9 /usr/lib64/graalvm/graalvm-community-java21 /usr/lib/jvm/graalvm21
6884
COPY --from=ghcr.io/graalvm/native-image-community:25-ol10 /usr/lib64/graalvm/graalvm-community-java25 /usr/lib/jvm/graalvm25
6985

70-
# See: Oracle docimention about script friendly download: https://docs.oracle.com/en-us/iaas/jms/doc/script-friendly-download.html
71-
# Note:
72-
# 1. Token can be created here: https://cloud.oracle.com/?tenant=ddsbxplayground&domain=datadog&region=us-ashburn-1
73-
# 2. Once created, token should be added to GitHub protected environment by repository administrator.
74-
RUN --mount=type=secret,id=oracle_java8_token <<-EOT
75-
set -eux
76-
sudo mkdir -p /usr/lib/jvm/oracle8
77-
# turn off tracing before touching secrets
78-
set +x
79-
sudo ORACLE_JAVA8_TOKEN="$(cat /run/secrets/oracle_java8_token)"
80-
sudo curl -L --fail -H "token:${ORACLE_JAVA8_TOKEN}" https://java.oraclecloud.com/java/8/latest/jdk-8-linux-x64_bin.tar.gz | sudo tar -xvzf - -C /usr/lib/jvm/oracle8 --strip-components 1
81-
unset ORACLE_JAVA8_TOKEN
82-
EOT
8386

8487
# Remove cruft from JDKs that is not used in the build process.
8588
RUN <<-EOT

0 commit comments

Comments
 (0)