statping/Dockerfile

24 lines
658 B
Docker
Raw Normal View History

2020-03-06 22:18:06 +00:00
FROM alpine:latest
2020-04-22 05:53:59 +00:00
ARG VERSION
ARG ARCH
RUN apk --no-cache add curl jq libsass linux-headers ca-certificates
2020-02-27 10:04:27 +00:00
2020-04-22 05:53:59 +00:00
RUN curl -L -s https://assets.statping.com/sass -o /usr/local/bin/sass && \
chmod +x /usr/local/bin/sass
RUN curl -fsSL https://github.com/statping/statping/releases/download/v$VERSION/statping-linux-$ARCH.tar.gz -o statping.tar.gz && \
tar -C /usr/local/bin -xzf statping.tar.gz && rm statping.tar.gz
2018-11-06 03:26:37 +00:00
2018-08-16 06:22:20 +00:00
WORKDIR /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
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
CMD statping --port $PORT