overflow_server/Dockerfile

29 lines
929 B
Docker
Raw Normal View History

2017-07-31 02:27:39 +00:00
FROM openjdk:8-jdk-alpine
MAINTAINER Loafle <rnd@loafle.com>
2017-08-09 02:50:02 +00:00
ENV APP_FILENAME="com.loafle.overflow.overflow_server-1.0.0-SNAPSHOT.jar" \
APP_HOME_PATH="/service" \
APP_MAIN_CLASS="com.loafle.overflow.OFMain" \
2017-09-07 08:05:03 +00:00
APP_CONF_PATH="/opt/conf" \
2017-08-09 02:50:02 +00:00
PATH="$PATH:/opt/bin"
2017-08-09 02:30:33 +00:00
2017-12-15 09:59:04 +00:00
ADD build/docker/bin/*.sh /opt/bin/
2017-08-09 02:50:02 +00:00
ADD target/lib ${APP_HOME_PATH}/lib
ADD target/${APP_FILENAME} ${APP_HOME_PATH}/
2017-08-09 02:30:33 +00:00
RUN apk add --no-cache curl \
&& chmod +x /opt/bin/*.sh
2017-08-09 02:50:02 +00:00
ENV TINI_VERSION='0.15.0' \
TINI_SHA='4007655082f573603c02bc1d2137443c8e153af047ffd088d02ccc01e6f06170'
2017-08-09 02:30:33 +00:00
# Use tini as subreaper in Docker container to adopt zombie processes
2017-08-09 02:50:02 +00:00
RUN curl -fsSL https://github.com/krallin/tini/releases/download/v${TINI_VERSION}/tini-static-amd64 -o /bin/tini \
&& chmod +x /bin/tini \
2017-08-09 02:30:33 +00:00
&& echo "$TINI_SHA /bin/tini" | sha256sum -c -
2017-09-07 08:05:03 +00:00
VOLUME ${APP_CONF_PATH}
2017-08-09 02:30:33 +00:00
EXPOSE 50006
2017-08-09 02:50:02 +00:00
ENTRYPOINT ["/bin/tini", "--"]
CMD ["docker-entrypoint.sh"]