Skip to content

Commit

Permalink
Use different base images for frauddetectionservice (#691)
Browse files Browse the repository at this point in the history
* Use different docker base images for frauddetection service

Signed-off-by: svrnm <neumanns@cisco.com>

* Add entry in CHANGELOG

Signed-off-by: svrnm <neumanns@cisco.com>

* update changelog

Signed-off-by: svrnm <neumanns@cisco.com>

* Remove extra blank line

Signed-off-by: svrnm <neumanns@cisco.com>
Co-authored-by: Juliano Costa <julianocosta89@outlook.com>
Co-authored-by: Carter Socha <43380952+cartersocha@users.noreply.github.com>
  • Loading branch information
3 people authored Jan 18, 2023
1 parent b337367 commit 17c9ade
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,3 +192,5 @@ significant modifications will be credited to OpenTelemetry Authors.
([#688](https://github.com/open-telemetry/opentelemetry-demo/pull/688))
* Update docker-compose services to restart unless stopped
([#690](https://github.com/open-telemetry/opentelemetry-demo/pull/690))
* Use different docker base images for frauddetection service
([#691](https://github.com/open-telemetry/opentelemetry-demo/pull/691))
1 change: 1 addition & 0 deletions src/frauddetectionservice/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Dockerfile
11 changes: 5 additions & 6 deletions src/frauddetectionservice/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
FROM eclipse-temurin:17 AS builder
FROM gradle:7-jdk17 AS builder

WORKDIR /usr/src/app/

COPY ./src/frauddetectionservice/ ./
COPY ./pb/ ./src/main/proto/
RUN chmod +x ./gradlew
RUN ./gradlew shadowJar
RUN gradle shadowJar

# -----------------------------------------------------------------------------

FROM eclipse-temurin:17
FROM gcr.io/distroless/java17-debian11

ARG version=1.16.0
ARG version=1.22.1
WORKDIR /usr/src/app/

COPY --from=builder /usr/src/app/build/libs/frauddetectionservice-1.0-all.jar ./
ADD https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/download/v$version/opentelemetry-javaagent.jar /app/opentelemetry-javaagent.jar
RUN chmod 644 /app/opentelemetry-javaagent.jar
# RUN chmod 644 /app/opentelemetry-javaagent.jar
ENV JAVA_TOOL_OPTIONS=-javaagent:/app/opentelemetry-javaagent.jar

ENTRYPOINT [ "java", "-jar", "frauddetectionservice-1.0-all.jar" ]

0 comments on commit 17c9ade

Please sign in to comment.