Skip to content

Commit

Permalink
chore(Dockerfile): pinpoint 의존성 제거
Browse files Browse the repository at this point in the history
  • Loading branch information
mikekks committed Jan 26, 2025
1 parent 28ce6c1 commit fcf46ea
Showing 1 changed file with 17 additions and 14 deletions.
31 changes: 17 additions & 14 deletions main/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"]

0 comments on commit fcf46ea

Please sign in to comment.