[#74] docker for applying spring boot to pinpoint-web

This commit is contained in:
Roy Kim
2020-08-26 08:51:56 +09:00
committed by Roy Kim
parent d835497b06
commit 6bd53dcd9d
7 changed files with 110 additions and 138 deletions

View File

@@ -1,17 +1,21 @@
FROM tomcat:8-jre8
FROM openjdk:8-jdk-alpine
LABEL maintainer="Roy Kim <roy.kim@navercorp.com>"
ARG PINPOINT_VERSION=${PINPOINT_VERSION:-2.0.4}
ARG INSTALL_URL=https://github.com/naver/pinpoint/releases/download/v${PINPOINT_VERSION}/pinpoint-web-${PINPOINT_VERSION}.war
ARG INSTALL_URL=https://github.com/naver/pinpoint/releases/download/v${PINPOINT_VERSION}/pinpoint-web-boot-${PINPOINT_VERSION}.jar
COPY /build/scripts/start-web.sh /usr/local/bin/
RUN mkdir -p /pinpoint/config \
&& mkdir -p /pinpoint/scripts
RUN chmod a+x /usr/local/bin/start-web.sh \
&& curl -SL ${INSTALL_URL} -o pinpoint-web.war \
&& rm -rf /usr/local/tomcat/webapps \
&& mkdir -p /usr/local/tomcat/webapps \
&& unzip pinpoint-web.war -d /usr/local/tomcat/webapps/ROOT \
&& rm -rf pinpoint-web.war
COPY /build/config/pinpoint-web.properties /pinpoint/config/
COPY /build/scripts/start-web.sh /pinpoint/scripts/
#temporary line for local test
#COPY /pinpoint-web-boot-2.1.0-SNAPSHOT.jar /pinpoint/pinpoint-web-boot.jar
ENTRYPOINT ["/usr/local/bin/start-web.sh"]
RUN chmod a+x /pinpoint/scripts/start-web.sh \
&& chmod a+x /pinpoint/config/pinpoint-web.properties \
&& curl -SL ${INSTALL_URL} -o /pinpoint/pinpoint-web-boot.jar
#entry point to start-web.sh for future use.
ENTRYPOINT ["sh", "/pinpoint/scripts/start-web.sh"]