aboutsummaryrefslogtreecommitdiff
path: root/Dockerfile
diff options
context:
space:
mode:
authorMarcel <34819524+MarcelCoding@users.noreply.github.com>2021-10-09 08:21:01 +0000
committerGitHub <noreply@github.com>2021-10-09 08:25:22 +0000
commitfe461ff66bd69997014fe190745e44e7696d0167 (patch)
tree047ddc0cc945c23b4fd0b777c504e20486d7249c /Dockerfile
parent1bfe6342df2fe7c094a31737bba511f9dfd44d71 (diff)
Added Docker Healthcheck
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile8
1 files changed, 7 insertions, 1 deletions
diff --git a/Dockerfile b/Dockerfile
index 8ca3a516a..22041cdc4 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -29,8 +29,9 @@ ARG LEVEL_ZERO_VERSION=1.2.20826
# Install dependencies:
# mesa-va-drivers: needed for AMD VAAPI. Mesa >= 20.1 is required for HEVC transcoding.
+# curl: healcheck
RUN apt-get update \
- && apt-get install --no-install-recommends --no-install-suggests -y ca-certificates gnupg wget apt-transport-https \
+ && apt-get install --no-install-recommends --no-install-suggests -y ca-certificates gnupg wget apt-transport-https curl \
&& wget -O - https://repo.jellyfin.org/jellyfin_team.gpg.key | apt-key add - \
&& echo "deb [arch=$( dpkg --print-architecture )] https://repo.jellyfin.org/$( awk -F'=' '/^ID=/{ print $NF }' /etc/os-release ) $( awk -F'=' '/^VERSION_CODENAME=/{ print $NF }' /etc/os-release ) main" | tee /etc/apt/sources.list.d/jellyfin.list \
&& apt-get update \
@@ -85,3 +86,8 @@ ENTRYPOINT ["./jellyfin/jellyfin", \
"--datadir", "/config", \
"--cachedir", "/cache", \
"--ffmpeg", "/usr/lib/jellyfin-ffmpeg/ffmpeg"]
+
+HEALTHCHECK --interval=30s --timeout=30s --start-period=10s --retries=3 \
+ # https://github.com/jellyfin/jellyfin/issues/5760#issuecomment-852297561
+ CMD curl http://localhost:$(grep -oP '(?<=PublicPort>)[^<]+' /config/config/network.xml)/$(grep -oP '(?<=BaseUrl>)[^<]+' /config/config/network.xml)health \
+ || exit 1