Skip to content

Commit dea1644

Browse files
debug 9
1 parent 9f3ab60 commit dea1644

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

Dockerfile

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ FROM eclipse-temurin:${LATEST_VERSION}-jdk-noble AS temurin-latest
66
# Intermediate image used to prune cruft from JDKs and squash them all.
77
FROM ubuntu:latest AS all-jdk
88
ARG LATEST_VERSION
9+
ARG ORACLE_JAVA8_TOKEN
910

1011
RUN <<-EOT
1112
set -eux
@@ -71,13 +72,9 @@ WORKDIR /home/non-root-user
7172
# Note:
7273
# 1. Token can be created here: https://cloud.oracle.com/?tenant=ddsbxplayground&domain=datadog&region=us-ashburn-1
7374
# 2. Once created, token should be added to GitHub protected environment by repository administrator.
74-
RUN id non-root-user
75-
RUN --mount=type=secret,id=oracle_java8_token,uid=1001,gid=1001,mode=0400 <<-EOT
75+
RUN <<-EOT
7676
set -eux
7777
sudo mkdir -p /usr/lib/jvm/oracle8
78-
# turn off tracing before touching secrets
79-
# debug set +x
80-
ORACLE_JAVA8_TOKEN="$(cat /run/secrets/oracle_java8_token)"
8178
echo $ORACLE_JAVA8_TOKEN
8279
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
8380
unset ORACLE_JAVA8_TOKEN

build

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,15 +66,13 @@ function compute_latest_version() {
6666
# See https://github.com/opencontainers/image-spec/blob/main/annotations.md for common labels
6767
# See https://docs.github.com/en/packages/learn-github-packages/connecting-a-repository-to-a-package
6868
function docker_build() {
69-
echo "DEBUG: $ORACLE_JAVA8_TOKEN" >> "$GITHUB_OUTPUT"
70-
7169
local target="$1"
7270
local tag="$2"
7371
shift
7472
shift
7573
docker build \
7674
--build-arg LATEST_VERSION=$LATEST_VERSION \
77-
--secret id=oracle_java8_token,env=ORACLE_JAVA8_TOKEN \
75+
--build-arg ORACLE_JAVA8_TOKEN=ORACLE_JAVA8_TOKEN \
7876
--platform linux/amd64 \
7977
--label org.opencontainers.image.created="$BUILD_DATE" \
8078
--label org.opencontainers.image.source=https://github.com/DataDog/dd-trace-java-docker-build \

0 commit comments

Comments
 (0)