diff --git a/src/adservice-v2/Dockerfile b/src/adservice-v2/Dockerfile index 5423bab41f..d2ad4e9a7a 100644 --- a/src/adservice-v2/Dockerfile +++ b/src/adservice-v2/Dockerfile @@ -10,17 +10,19 @@ RUN ./mvnw --batch-mode clean package -DskipTests FROM docker.m.daocloud.io/library/openjdk:11.0.15-jre WORKDIR /app/ +ARG version=1.23.0 COPY --from=builder /app/target/adservice-v2-1.0-SNAPSHOT.jar ./ COPY --from=builder /app/jmx_prometheus_javaagent-0.17.0.jar ./ COPY --from=builder /app/prometheus-jmx-config.yaml ./ -RUN set -ex; \ - curl -L -O https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/download/v1.22.1/opentelemetry-javaagent.jar; +ADD https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/download/v$version/opentelemetry-javaagent.jar /usr/src/app/opentelemetry-javaagent.jar + +RUN chmod 644 /usr/src/app/opentelemetry-javaagent.jar ENV OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4317 \ OTEL_RESOURCE_ATTRIBUTES=service.name=adservice-springcloud \ - JAVA_TOOL_OPTIONS=-javaagent:opentelemetry-javaagent.jar \ + JAVA_TOOL_OPTIONS=-javaagent:/usr/src/app/opentelemetry-javaagent.jar \ JAVA_OPTS='-Dspring.cloud.nacos.config.enabled=false -Dspring.randomError=false' \ AD_SERVICE_PORT=8080 diff --git a/src/adservice/Dockerfile b/src/adservice/Dockerfile index 22c6a634ca..8b6aa1da92 100644 --- a/src/adservice/Dockerfile +++ b/src/adservice/Dockerfile @@ -30,7 +30,7 @@ RUN ./gradlew installDist -PprotoSourceDir=./proto FROM eclipse-temurin:17-jre -ARG version=1.19.1 +ARG version=1.23.0 WORKDIR /usr/src/app/ COPY --from=builder /usr/src/app/ ./ diff --git a/src/dataservice/Dockerfile b/src/dataservice/Dockerfile index b52c167ad6..4f9de30ea6 100644 --- a/src/dataservice/Dockerfile +++ b/src/dataservice/Dockerfile @@ -10,16 +10,18 @@ RUN ./mvnw --batch-mode clean package -DskipTests FROM docker.m.daocloud.io/library/openjdk:11.0.15-jre WORKDIR /app/ +ARG version=1.23.0 COPY --from=builder /app/target/dataservice-0.0.1-SNAPSHOT.jar ./ -RUN set -ex; \ - curl -L -O https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/download/v1.22.1/opentelemetry-javaagent.jar; +ADD https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/download/v$version/opentelemetry-javaagent.jar /usr/src/app/opentelemetry-javaagent.jar + +RUN chmod 644 /usr/src/app/opentelemetry-javaagent.jar ENV OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4317 \ OTEL_RESOURCE_ATTRIBUTES=service.name=dataservice \ - JAVA_TOOL_OPTIONS=-javaagent:opentelemetry-javaagent.jar \ - JAVA_OPTS='-Dspring.cloud.nacos.config.enabled=false' + JAVA_TOOL_OPTIONS=-javaagent:/usr/src/app/opentelemetry-javaagent.jar \ + JAVA_OPTS=' -Dotel.jmx.target.system=tomcat -Dspring.cloud.nacos.config.enabled=false' EXPOSE 8082 8999 8888 diff --git a/src/frauddetectionservice/Dockerfile b/src/frauddetectionservice/Dockerfile index 73018d73f9..813bc6f9d9 100644 --- a/src/frauddetectionservice/Dockerfile +++ b/src/frauddetectionservice/Dockerfile @@ -10,7 +10,7 @@ RUN gradle shadowJar FROM gcr.io/distroless/java17-debian11 -ARG version=1.22.1 +ARG version=1.23.0 WORKDIR /usr/src/app/ COPY --from=builder /usr/src/app/build/libs/frauddetectionservice-1.0-all.jar ./ diff --git a/src/kafka/Dockerfile b/src/kafka/Dockerfile index de775cc823..1826899ba3 100644 --- a/src/kafka/Dockerfile +++ b/src/kafka/Dockerfile @@ -1,7 +1,7 @@ FROM confluentinc/cp-kafka:latest-ubi8 USER root -ARG version=1.21.0 +ARG version=1.23.0 ADD https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/download/v$version/opentelemetry-javaagent.jar /tmp/opentelemetry-javaagent.jar RUN chmod go+r /tmp/opentelemetry-javaagent.jar