Skip to content

Commit

Permalink
chore(docker): Add HEALTHCHECK
Browse files Browse the repository at this point in the history
- Add curl to Dockerfile using COPY command from another image
- Add HEALTHCHECK to track the status of the Docker container via a specified command
Signed-off-by: 陳鈞 <[email protected]>
  • Loading branch information
jim60105 committed Jun 16, 2024
1 parent ae8c70b commit 89ac06e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,11 @@ RUN install -d -m 775 -o $UID -g 0 /home/site/wwwroot && \
# dumb-init
COPY --link --chown=$UID:0 --chmod=775 --from=ghcr.io/jim60105/static-ffmpeg-upx:7.0-1 /dumb-init /usr/bin/

COPY --link --chown=$UID:0 --chmod=775 --from=ghcr.io/tarampampam/curl:8.8.0 /bin/curl /bin/curl
HEALTHCHECK --interval=10s --timeout=2s --retries=3 --start-period=10s CMD [ \
"curl", "--fail", "http://127.0.0.1:8080/api/Utility/Wake/" \
]

# Copy licenses (OpenShift Policy)
COPY --link --chown=$UID:0 --chmod=775 LICENSE /licenses/LICENSE
COPY --link --chown=$UID:0 --chmod=775 --from=ghcr.io/jim60105/yt-dlp:distroless /licenses/yt-dlp.LICENSE /licenses/yt-dlp.LICENSE
Expand Down

0 comments on commit 89ac06e

Please sign in to comment.