This repository was archived by the owner on May 14, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
44 lines (42 loc) · 1.5 KB
/
Copy pathDockerfile
File metadata and controls
44 lines (42 loc) · 1.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# hadolint ignore=DL3007
FROM eafxx/ubuntu-base:latest
LABEL maintainer="https://github.com/elmerfdz"
ARG VERSION
SHELL ["/bin/bash", "-eo", "pipefail", "-c"]
# hadolint ignore=DL3018,DL3003,DL3008
RUN \
mkdir -p /install && \
rm -rf /etc/apt/apt.conf.d/docker-gzip-indexes && \
apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
tzdata \
curl \
jq \
iputils-ping \
ruby-sass
ENV IS_DOCKER=true
ENV STATPING_DIR=/app
ENV PORT=8080
WORKDIR /install
SHELL ["/bin/bash", "-eo", "pipefail", "-c"]
# hadolint ignore=DL3018,DL3003,DL3008,SC2086
RUN \
chmod +x /etc/s6/init/init-stage2 && \
chmod +x /docker-mods && \
MACHINE_ARCH="$(uname -m)" && \
case "$MACHINE_ARCH" in \
x86_64) export ARCH='amd64' ;; \
armhf|arm|armv7l|armv7) export ARCH='arm-7' ;; \
arm64|aarch64|armv8b|armv8l|aarch64_be) export ARCH='arm64' ;; \
esac && \
VERSION=$(curl -s https://api.github.com/repositories/136770331/releases/latest | jq -r ".tag_name") && \
curl -L -o statping-linux-"$ARCH".tar.gz https://github.com/statping/statping/releases/download/"$VERSION"/statping-linux-"$ARCH".tar.gz && \
tar -xvzf statping-linux-"$ARCH".tar.gz && \
chmod +x statping && \
mv statping /usr/local/bin/statping && \
rm -rf statping-linux-"$ARCH".tar.gz
COPY root/ /
WORKDIR /app
VOLUME /app
EXPOSE $PORT
HEALTHCHECK --interval=60s --timeout=10s --retries=3 CMD curl -s "http://localhost:$PORT/health" | jq -r -e ".online==true"