diff --git a/auth/src/main/java/com/google/cloud/auth/samples/customcredentials/aws/Dockerfile b/auth/src/main/java/com/google/cloud/auth/samples/customcredentials/aws/Dockerfile index 49069fc6410..50849a38ac3 100644 --- a/auth/src/main/java/com/google/cloud/auth/samples/customcredentials/aws/Dockerfile +++ b/auth/src/main/java/com/google/cloud/auth/samples/customcredentials/aws/Dockerfile @@ -1,33 +1,21 @@ -# Build the application FROM maven:3.9-eclipse-temurin-17 AS builder WORKDIR /app -# Copy only the build config first (for better layer caching) COPY pom.xml . COPY src ./src -# 'clean package': Compiles the code and creates the thin jar in /app/target -# 'dependency:copy-dependencies': Copies all JARs to /app/target/libs -# We explicitly set -DoutputDirectory so we know EXACTLY where they are. RUN mvn clean package dependency:copy-dependencies \ -DoutputDirectory=target/libs \ -DskipTests -# Run the application -FROM eclipse-temurin:17-jre-focal +FROM eclipse-temurin:17.0.17_10-jre -# Security: Create a non-root user RUN useradd -m appuser USER appuser WORKDIR /app -# Copy the Thin Jar COPY --from=builder --chown=appuser:appuser /app/target/auth-1.0.jar app.jar - -# Copy the Dependencies (The libraries) COPY --from=builder --chown=appuser:appuser /app/target/libs lib/ -# Run with Classpath -# We add 'app.jar' and everything in 'lib/' to the classpath. CMD ["java", "-cp", "app.jar:lib/*", "com.google.cloud.auth.samples.customcredentials.aws.CustomCredentialSupplierAwsWorkload"] diff --git a/run/image-processing/Dockerfile b/run/image-processing/Dockerfile index 59c763ffebf..f34c903f8a3 100644 --- a/run/image-processing/Dockerfile +++ b/run/image-processing/Dockerfile @@ -17,7 +17,7 @@ # It's important to use JDK 8u191 or above that has container support enabled. # https://hub.docker.com/_/eclipse-temurin/ # https://docs.docker.com/develop/develop-images/multistage-build/#use-multi-stage-builds -FROM eclipse-temurin:17.0.16_8-jre +FROM eclipse-temurin:17.0.17_10-jre # Install Imagemagick into the container image. # For more on system packages review the system packages tutorial. diff --git a/run/system-package/Dockerfile b/run/system-package/Dockerfile index 02e00ef1e14..9c716b5c10f 100644 --- a/run/system-package/Dockerfile +++ b/run/system-package/Dockerfile @@ -15,7 +15,7 @@ # [START cloudrun_system_package_dockerfile] # Use the Official eclipse-temurin image for a lean production stage of our multi-stage build. # https://hub.docker.com/_/eclipse-temurin/ -FROM eclipse-temurin:17.0.16_8-jre +FROM eclipse-temurin:17.0.17_10-jre RUN apt-get update -y && apt-get install -y \ graphviz \