Skip to content

Commit 4d7c8d6

Browse files
committed
Update thc to 0.39.0 and use new THC_PORT_NAME
Closes #162
1 parent b0fcfa4 commit 4d7c8d6

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

Dockerfile

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@
22
# check=error=true
33

44
# Default values for versions
5-
ARG THC_VERSION='0.36.0' \
5+
ARG THC_VERSION='0.39.0' \
66
TINI_VERSION='0.19.0'
77

88
# Default values for variables that change less often
99
ARG DENO_DIR='/deno-dir' \
1010
GH_BASE_URL='https://github.com' \
11+
THC_PORT_NAME='PORT' \
1112
HOST='0.0.0.0' \
1213
PORT='8282'
1314

@@ -30,15 +31,18 @@ RUN adduser -u 10001 -S appuser
3031
# Stage for downloading files using curl from Debian
3132
FROM dependabot-debian AS debian-curl
3233
RUN DEBIAN_FRONTEND='noninteractive' && export DEBIAN_FRONTEND && \
33-
apt-get update && apt-get install -y curl
34+
apt-get update && apt-get install -y curl xz-utils
3435

3536
# Download tiny-health-checker from GitHub
3637
FROM debian-curl AS thc-download
3738
ARG GH_BASE_URL THC_VERSION
3839
RUN arch="$(uname -m)" && \
3940
gh_url() { printf -- "${GH_BASE_URL}/%s/releases/download/%s/%s\n" "$@" ; } && \
40-
URL="$(gh_url dmikusa/tiny-health-checker v${THC_VERSION} thc-${arch}-unknown-linux-musl)" && \
41-
curl -fsSL --output /thc "${URL}" && chmod -v 00555 /thc
41+
URL="$(gh_url dmikusa/tiny-health-checker v${THC_VERSION} tiny-health-checker-${arch}-unknown-linux-musl.tar.xz)" && \
42+
curl -fsSL --output /tiny-health-checker-${arch}-unknown-linux-musl.tar.xz "${URL}" && \
43+
tar -xvf /tiny-health-checker-${arch}-unknown-linux-musl.tar.xz && \
44+
mv /tiny-health-checker-${arch}-unknown-linux-musl/thc /thc && \
45+
chmod -v 00555 /thc
4246

4347
# Cache the thc binary as a layer
4448
FROM scratch AS thc-bin
@@ -117,13 +121,13 @@ WORKDIR /app
117121

118122
COPY --from=builder /app/invidious_companion ./
119123

120-
ARG HOST PORT THC_VERSION TINI_VERSION
124+
ARG HOST PORT THC_VERSION THC_PORT_NAME TINI_VERSION
121125
EXPOSE "${PORT}/tcp"
122126

123127
ENV SERVER_BASE_PATH=/companion \
124128
HOST="${HOST}" \
125129
PORT="${PORT}" \
126-
THC_PORT="${PORT}" \
130+
THC_PORT_NAME="${THC_PORT_NAME}" \
127131
THC_PATH="/healthz" \
128132
THC_VERSION="${THC_VERSION}" \
129133
TINI_VERSION="${TINI_VERSION}"

0 commit comments

Comments
 (0)