From fcf46ea13d3378b7c7f4af97fd3aad53e81ea97c Mon Sep 17 00:00:00 2001 From: mikekks Date: Mon, 27 Jan 2025 00:39:57 +0900 Subject: [PATCH] =?UTF-8?q?chore(Dockerfile):=20pinpoint=20=EC=9D=98?= =?UTF-8?q?=EC=A1=B4=EC=84=B1=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main/Dockerfile | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/main/Dockerfile b/main/Dockerfile index 1a01b669..74989a80 100644 --- a/main/Dockerfile +++ b/main/Dockerfile @@ -9,20 +9,23 @@ COPY --from=build /app/build/libs/*.jar app.jar ARG SPRING_PROFILES_ACTIVE -# Default values -ENV AGENT_ID="agent-in-docker" -ENV APPLICATION_NAME="spring" +# 핀포인트 설정을 위한 세팅 (현재는 사용하지 않기 때문에 주석처리) +#ENV AGENT_ID="agent-in-docker" +#ENV APPLICATION_NAME="spring" -# Set environment variables based on the active profile -RUN if [ "$SPRING_PROFILES_ACTIVE" = "dev" ]; then \ - AGENT_ID="dev-agent"; \ - APPLICATION_NAME="spring-dev"; \ - elif [ "$SPRING_PROFILES_ACTIVE" = "prod" ]; then \ - AGENT_ID="prod-agent"; \ - APPLICATION_NAME="spring-prod"; \ - fi && \ - echo "Using AGENT_ID=$AGENT_ID and APPLICATION_NAME=$APPLICATION_NAME" +# 핀포인트 설정을 위한 세팅 (현재는 사용하지 않기 때문에 주석처리) +#RUN if [ "$SPRING_PROFILES_ACTIVE" = "dev" ]; then \ +# AGENT_ID="dev-agent"; \ +# APPLICATION_NAME="spring-dev"; \ +# elif [ "$SPRING_PROFILES_ACTIVE" = "prod" ]; then \ +# AGENT_ID="prod-agent"; \ +# APPLICATION_NAME="spring-prod"; \ +# fi && \ +# echo "Using AGENT_ID=$AGENT_ID and APPLICATION_NAME=$APPLICATION_NAME" -ENV JAVA_OPTS="-javaagent:/pinpoint-agent/pinpoint-bootstrap-2.5.3.jar -Dpinpoint.agentId=$AGENT_ID -Dpinpoint.applicationName=$APPLICATION_NAME -Dpinpoint.profiler.profiles.active=release" -ENTRYPOINT ["sh", "-c", "java $JAVA_OPTS -jar /app/app.jar"] +# 핀포인트 설정을 위한 세팅 (현재는 사용하지 않기 때문에 주석처리) +# ENV JAVA_OPTS="-javaagent:/pinpoint-agent/pinpoint-bootstrap-2.5.3.jar -Dpinpoint.agentId=$AGENT_ID -Dpinpoint.applicationName=$APPLICATION_NAME -Dpinpoint.profiler.profiles.active=release" +# ENTRYPOINT ["sh", "-c", "java $JAVA_OPTS -jar /app/app.jar"] + +ENTRYPOINT ["java","-jar","/app/app.jar"]