forked from DataDog/dd-continuous-profiler-demo
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.movies
More file actions
31 lines (22 loc) · 713 Bytes
/
Copy pathDockerfile.movies
File metadata and controls
31 lines (22 loc) · 713 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
FROM eclipse-temurin:21-jdk-jammy
RUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/*
WORKDIR /app
ENV DD_SERVICE "movies-api-java"
ENV DD_ENV "prod"
LABEL com.datadoghq.tags.service="movies-api-java"
LABEL com.datadoghq.tags.env="prod"
# Copy the Gradle files
COPY build.gradle settings.gradle /app/
COPY gradle /app/gradle
COPY gradlew /app/
# Copy the source code
COPY src /app/src
COPY movies-v2.json.gz /app/
# Download Datadog Java tracer
RUN curl -L -o dd-java-agent.jar https://dtdg.co/latest-java-tracer
# Build the application
RUN ./gradlew build --no-daemon
# Expose the application port
EXPOSE 8081
# Run the leaky server
CMD ["./gradlew", "runServer", "--no-daemon"]