central/Dockerfile

28 lines
849 B
Docker
Raw Normal View History

2018-04-06 12:46:02 +00:00
FROM openjdk:8-jdk-alpine
ENV APP_FILENAME="com.loafle.overflow.central-1.0.0-SNAPSHOT.jar" \
APP_HOME_PATH="/service" \
APP_MAIN_CLASS="com.loafle.overflow.central.Central" \
2018-06-14 07:09:53 +00:00
APP_PATH_LOGS="/var/central/logs" \
2018-04-06 12:46:02 +00:00
PATH="$PATH:/opt/bin"
ADD build/docker/bin/*.sh /opt/bin/
ADD target/lib ${APP_HOME_PATH}/lib
ADD target/${APP_FILENAME} ${APP_HOME_PATH}/
RUN apk add --no-cache curl \
&& chmod +x /opt/bin/*.sh
ENV TINI_VERSION='0.17.0' \
TINI_SHA='4007655082f573603c02bc1d2137443c8e153af047ffd088d02ccc01e6f06170'
# Use tini as subreaper in Docker container to adopt zombie processes
RUN curl -fsSL https://github.com/krallin/tini/releases/download/v${TINI_VERSION}/tini-static-amd64 -o /bin/tini \
&& chmod +x /bin/tini
2018-06-14 07:09:53 +00:00
VOLUME ${APP_PATH_LOGS}
EXPOSE 9111
2018-04-06 12:46:02 +00:00
ENTRYPOINT ["/bin/tini", "--"]
CMD ["docker-entrypoint.sh"]