2020-02-27 10:04:27 +00:00
|
|
|
FROM hunterlong/statping:base as base
|
|
|
|
|
2018-11-06 03:26:37 +00:00
|
|
|
FROM alpine:latest
|
2019-04-20 03:50:19 +00:00
|
|
|
LABEL maintainer="Hunter Long (https://github.com/hunterlong)"
|
2018-08-16 06:22:20 +00:00
|
|
|
|
2018-11-06 03:26:37 +00:00
|
|
|
ARG VERSION
|
2020-02-27 10:04:27 +00:00
|
|
|
|
2019-03-04 15:48:08 +00:00
|
|
|
RUN apk --no-cache add curl jq libsass
|
2018-11-06 03:26:37 +00:00
|
|
|
|
2019-03-04 14:25:11 +00:00
|
|
|
COPY --from=base /usr/local/bin/sass /usr/local/bin/sass
|
2018-12-04 04:17:29 +00:00
|
|
|
COPY --from=base /go/bin/statping /usr/local/bin/statping
|
2018-11-06 03:26:37 +00:00
|
|
|
|
2018-08-16 06:22:20 +00:00
|
|
|
WORKDIR /app
|
|
|
|
VOLUME /app
|
2020-02-27 10:04:27 +00:00
|
|
|
|
|
|
|
ENV IS_DOCKER=true
|
|
|
|
ENV STATPING_DIR=/app
|
|
|
|
ENV PORT=8080
|
|
|
|
|
2018-12-20 03:52:53 +00:00
|
|
|
EXPOSE $PORT
|
2018-11-06 01:34:02 +00:00
|
|
|
|
2020-01-13 04:46:15 +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
|
|
|
|
2018-12-20 04:29:38 +00:00
|
|
|
CMD statping -port $PORT
|