@@ -12,6 +12,9 @@ ARG DENO_DIR='/deno-dir' \
12
12
HOST='0.0.0.0' \
13
13
PORT='8282'
14
14
15
+ # sha256 checksums for binaries
16
+ ARG THC_SHA256='cb1797948015da46c222764a99ee30c06a6a9a30f5b87f212a28ea3c6d07610d' \
17
+ TINI_SHA256='93dcc18adc78c65a028a84799ecf8ad40c936fdfc5f2a57b1acda5a8117fa82c'
15
18
16
19
# we can use these aliases and let dependabot remain simple
17
20
# inspired by:
@@ -35,11 +38,12 @@ RUN DEBIAN_FRONTEND='noninteractive' && export DEBIAN_FRONTEND && \
35
38
36
39
# Download tiny-health-checker from GitHub
37
40
FROM debian-curl AS thc-download
38
- ARG GH_BASE_URL THC_VERSION
41
+ ARG GH_BASE_URL THC_VERSION THC_SHA256
39
42
RUN arch="$(uname -m)" && \
40
43
gh_url() { printf -- "${GH_BASE_URL}/%s/releases/download/%s/%s\n " "$@" ; } && \
41
44
URL="$(gh_url dmikusa/tiny-health-checker v${THC_VERSION} tiny-health-checker-${arch}-unknown-linux-musl.tar.xz)" && \
42
45
curl -fsSL --output /tiny-health-checker-${arch}-unknown-linux-musl.tar.xz "${URL}" && \
46
+ echo "${THC_SHA256} /tiny-health-checker-${arch}-unknown-linux-musl.tar.xz" | sha256sum -c && \
43
47
tar -xvf /tiny-health-checker-${arch}-unknown-linux-musl.tar.xz && \
44
48
mv /tiny-health-checker-${arch}-unknown-linux-musl/thc /thc && \
45
49
chmod -v 00555 /thc
@@ -52,11 +56,13 @@ COPY --from=thc-download /thc /thc
52
56
53
57
# Download tini from GitHub
54
58
FROM debian-curl AS tini-download
55
- ARG GH_BASE_URL TINI_VERSION
59
+ ARG GH_BASE_URL TINI_VERSION TINI_SHA256
56
60
RUN arch="$(dpkg --print-architecture)" && \
57
61
gh_url() { printf -- "${GH_BASE_URL}/%s/releases/download/%s/%s\n " "$@" ; } && \
58
62
URL="$(gh_url krallin/tini v${TINI_VERSION} tini-${arch})" && \
59
- curl -fsSL --output /tini "${URL}" && chmod -v 00555 /tini
63
+ curl -fsSL --output /tini "${URL}" && \
64
+ echo "${TINI_SHA256} /tini" | sha256sum -c && \
65
+ chmod -v 00555 /tini
60
66
61
67
# Cache the tini binary as a layer
62
68
FROM scratch AS tini-bin
0 commit comments