-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
50 lines (41 loc) · 1.04 KB
/
Copy pathDockerfile
File metadata and controls
50 lines (41 loc) · 1.04 KB
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# Telemon Dockerfile
# Builds a containerized version of Telemon for monitoring from within Docker
FROM alpine:3.22
# Install required packages
RUN apk add --no-cache \
bash \
curl \
coreutils \
procps \
iputils \
docker-cli \
tzdata \
envsubst
# Create telemon directory
WORKDIR /opt/telemon
# Copy telemon files
COPY telemon.sh .
COPY install.sh .
COPY uninstall.sh .
COPY update.sh .
COPY telemon-admin.sh .
COPY lib/ ./lib/
COPY telemon-logrotate.conf .
COPY .env.example .
COPY README.md .
COPY LICENSE .
# Make scripts executable
RUN chmod +x *.sh
# Create directories
RUN mkdir -p /var/log/telemon /var/lib/telemon
# Health check - verify telemon can run (dry run)
HEALTHCHECK --interval=5m --timeout=3s \
CMD bash -n /opt/telemon/telemon.sh || exit 1
# Default environment
ENV TELEGRAM_BOT_TOKEN=""
ENV TELEGRAM_CHAT_ID=""
ENV STATE_FILE="/var/lib/telemon/state"
ENV LOG_FILE="/var/log/telemon/telemon.log"
ENV SCRIPT_DIR="/opt/telemon"
# Run telemon (requires .env to be mounted)
ENTRYPOINT ["bash", "./telemon.sh"]