From 3e967dbad45f145520d308aeb1b10368db249f26 Mon Sep 17 00:00:00 2001 From: Stanley Cheung Date: Wed, 24 May 2023 23:27:20 +0000 Subject: [PATCH 1/2] gcp observability: Update Docker images to eclipse-temurin --- buildscripts/observability-test/Dockerfile | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/buildscripts/observability-test/Dockerfile b/buildscripts/observability-test/Dockerfile index e5fd11cb67a..4e9fd688983 100644 --- a/buildscripts/observability-test/Dockerfile +++ b/buildscripts/observability-test/Dockerfile @@ -17,11 +17,18 @@ # Stage 1: Build the interop test client and server # -FROM openjdk:11.0.16-jdk-slim-bullseye AS build +FROM eclipse-temurin:11-jdk AS build WORKDIR /grpc-java COPY . . +# Intentionally after the app COPY to force the update on each build. +# Update Ubuntu system packages: +RUN apt-get update \ + && apt-get -y upgrade \ + && apt-get -y autoremove \ + && rm -rf /var/lib/apt/lists/* + RUN ./gradlew :grpc-gcp-observability:interop:installDist -PskipCodegen=true -PskipAndroid=true @@ -33,7 +40,7 @@ RUN ./gradlew :grpc-gcp-observability:interop:installDist -PskipCodegen=true -Ps # with the given parameters. # -FROM openjdk:11.0.16-jdk-slim-bullseye +FROM eclipse-temurin:11-jre WORKDIR /grpc-java/ COPY --from=build /grpc-java/gcp-observability/interop/build/install/interop/. . From b56a8e93b6f51d2f377269dc9bb6665e3730164d Mon Sep 17 00:00:00 2001 From: Stanley Cheung Date: Thu, 25 May 2023 20:46:47 +0000 Subject: [PATCH 2/2] Move apt update to second stage of the build --- buildscripts/observability-test/Dockerfile | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/buildscripts/observability-test/Dockerfile b/buildscripts/observability-test/Dockerfile index 4e9fd688983..82d21f78263 100644 --- a/buildscripts/observability-test/Dockerfile +++ b/buildscripts/observability-test/Dockerfile @@ -22,13 +22,6 @@ FROM eclipse-temurin:11-jdk AS build WORKDIR /grpc-java COPY . . -# Intentionally after the app COPY to force the update on each build. -# Update Ubuntu system packages: -RUN apt-get update \ - && apt-get -y upgrade \ - && apt-get -y autoremove \ - && rm -rf /var/lib/apt/lists/* - RUN ./gradlew :grpc-gcp-observability:interop:installDist -PskipCodegen=true -PskipAndroid=true @@ -48,4 +41,11 @@ COPY --from=build /grpc-java/gcp-observability/interop/build/install/interop/. . WORKDIR /grpc-java/buildscripts/observability-test COPY --from=build /grpc-java/buildscripts/observability-test/run.sh . +# Intentionally after the app COPY to force the update on each build. +# Update Ubuntu system packages: +RUN apt-get update \ + && apt-get -y upgrade \ + && apt-get -y autoremove \ + && rm -rf /var/lib/apt/lists/* + ENTRYPOINT ["/grpc-java/buildscripts/observability-test/run.sh"]