File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ .git
2+ .gitignore
3+ .gradle
4+ build /
5+ ! gradle /wrapper /gradle-wrapper.jar
6+ .idea
7+ .vscode
8+ * .iml
9+ * .ipr
10+ * .iws
11+ .DS_Store
12+ Thumbs.db
13+ * .log
14+ logs /
15+ .jacoco
16+ docs /
17+ * .md
18+ ! README.md
19+ .github
20+ .env
21+ .env.local
Original file line number Diff line number Diff line change 1+ FROM amazoncorretto:21 AS builder
2+ WORKDIR /app
3+
4+ COPY gradlew ./
5+ COPY build.gradle settings.gradle lombok.config ./
6+ COPY gradle ./gradle
7+
8+ RUN chmod +x gradlew && ./gradlew dependencies --no-daemon || true
9+
10+ COPY src ./src
11+ RUN ./gradlew clean bootJar -x test -x copyApiDocument --no-daemon
12+
13+ FROM amazoncorretto:21-al2023-headless
14+ WORKDIR /app
15+
16+ RUN (command -v dnf && dnf install -y shadow-utils && dnf clean all) || \
17+ (yum install -y shadow-utils && yum clean all) && \
18+ groupadd -r appuser && \
19+ useradd -r -g appuser appuser
20+
21+ COPY --from=builder /app/build/libs/*.jar app.jar
22+ RUN chown appuser:appuser app.jar
23+
24+ USER appuser
25+ EXPOSE 8080
26+
27+ ENTRYPOINT ["sh" , "-c" , "\
28+ exec java \
29+ -javaagent:${PINPOINT_AGENT_PATH}/pinpoint-bootstrap-${PINPOINT_AGENT_VERSION}.jar \
30+ -Dpinpoint.agentId=${PINPOINT_AGENT_ID} \
31+ -Dpinpoint.applicationName=${PINPOINT_APPLICATION_NAME} \
32+ -Dpinpoint.config=${PINPOINT_AGENT_PATH}/pinpoint-root.config \
33+ -Dprofiler.transport.grpc.collector.ip=${PINPOINT_COLLECTOR_IP} \
34+ -Dprofiler.transport.grpc.collector.connect.timeout=${PINPOINT_CONNECT_TIMEOUT} \
35+ -Dprofiler.transport.grpc.collector.request.timeout=${PINPOINT_REQUEST_TIMEOUT} \
36+ -Dspring.profiles.active=${SPRING_PROFILES_ACTIVE} \
37+ ${JAVA_OPTS} \
38+ -jar app.jar \
39+ " ]
Original file line number Diff line number Diff line change @@ -15,6 +15,10 @@ java {
1515 }
1616}
1717
18+ tasks. named(' jar' ) {
19+ enabled = false
20+ }
21+
1822configurations {
1923 compileOnly {
2024 extendsFrom annotationProcessor
You can’t perform that action at this time.
0 commit comments