-
Notifications
You must be signed in to change notification settings - Fork 4
/
Dockerfile
29 lines (24 loc) · 868 Bytes
/
Dockerfile
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
# Set the base image
FROM ghcr.io/linuxserver/baseimage-alpine:3.19@sha256:7cbea92e1f99242bad4678860f24b7adb1f47fd80f6be901a3cc3e75d167224b
# Set the maintainer
LABEL maintainer="GhostWriters"
# copy local files
COPY root/ /
# Install required packages and application dependencies
RUN \
echo "**** install runtime packages ****" && \
apk add --no-cache \
py3-pip && \
echo "**** install app ****" && \
pip3 install --break-system-packages --no-cache-dir -r /opt/requirements.txt && \
echo "**** cleanup ****" && \
rm -rf \
/tmp/* \
"$HOME/.cache"
# Add a health check command to ensure the container is running correctly
HEALTHCHECK --interval=15m \
--timeout=3s \
CMD ps -ef | grep cron || exit 1 \
&& ping -c 1 www.packtpub.com >/dev/null 2>&1 || exit 1
# Volume where the config file and crontab
VOLUME /config