2020-05-06 08:32:27 +00:00
|
|
|
FROM statping/statping:base AS base
|
2020-05-05 23:33:08 +00:00
|
|
|
|
2020-05-06 08:32:27 +00:00
|
|
|
# Statping main Docker image that contains all required libraries
|
|
|
|
FROM alpine:latest
|
|
|
|
RUN apk --no-cache add libgcc libstdc++ ca-certificates curl jq && update-ca-certificates
|
2020-04-22 05:53:59 +00:00
|
|
|
|
2020-05-06 08:32:27 +00:00
|
|
|
COPY --from=base /go/bin/statping /usr/local/bin/
|
|
|
|
COPY --from=base /usr/local/bin/sass /usr/local/bin/
|
|
|
|
COPY --from=base /usr/local/share/ca-certificates /usr/local/share/
|
2018-11-06 03:26:37 +00:00
|
|
|
|
2018-08-16 06:22:20 +00:00
|
|
|
WORKDIR /app
|
2020-06-02 02:02:25 +00:00
|
|
|
VOLUME /app
|
2020-02-27 10:04:27 +00:00
|
|
|
|
2020-05-06 08:32:27 +00:00
|
|
|
ENV IS_DOCKER=true
|
|
|
|
ENV SASS=/usr/local/bin/sass
|
2020-05-05 23:33:08 +00:00
|
|
|
ENV STATPING_DIR=/app
|
2020-05-06 08:32:27 +00:00
|
|
|
ENV PORT=8080
|
2020-02-27 10:04:27 +00:00
|
|
|
|
2018-12-20 03:52:53 +00:00
|
|
|
EXPOSE $PORT
|
2018-11-06 01:34:02 +00:00
|
|
|
|
2020-05-06 08:32:27 +00:00
|
|
|
HEALTHCHECK --interval=60s --timeout=10s --retries=3 CMD curl -s "http://localhost:$PORT/health" | jq -r -e ".online==true"
|
2018-11-06 01:34:02 +00:00
|
|
|
|
2020-04-19 12:53:23 +00:00
|
|
|
CMD statping --port $PORT
|