overflow_server_app/Dockerfile
crusader 24f1d2c389 ing
2018-03-26 23:47:55 +09:00

35 lines
960 B
Docker

FROM alpine:latest
ENV APP_VERSION=1.0.0 \
APP_HOME=/opt \
APP_NAME=overflow_server_app
ENV APP_CONFIG_PATH="${APP_HOME}/config" \
APP_LOGS_PATH="${APP_HOME}/logs" \
PATH="$PATH:${APP_HOME}/bin"
ADD dist/${APP_NAME} ${APP_HOME}/bin/
ADD _docker/bin/*.sh ${APP_HOME}/bin/
RUN apk add --no-cache curl \
&& chmod +x ${APP_HOME}/bin/*.sh \
&& mkdir -p ${APP_LOGS_PATH}
ENV TINI_VERSION='0.17.0'
# 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
VOLUME ${APP_CONFIG_PATH}
VOLUME ${APP_LOGS_PATH}
EXPOSE 80 443
ENTRYPOINT ["/bin/tini", "--"]
CMD ["docker-entrypoint.sh"]
# docker build -f Dockerfile -t docker.loafle.net/overflow/overflow_service_websocket:1.0.0-alpine .
# docker run -d -p 18081:80 -t docker.loafle.net/overflow/overflow_service_websocket:1.0.0-alpine