FROM alpine:latest ENV APP_VERSION=1.0.0 \ APP_HOME=/opt \ APP_NAME=overflow_gateway_webapp 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.15.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 \ && echo "$TINI_SHA /bin/tini" | sha256sum -c - 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