Repository navigation
Expand file tree
/
Copy pathDockerfile
More file actions
131 lines (117 loc) · 4.46 KB
/
Copy pathDockerfile
File metadata and controls
131 lines (117 loc) · 4.46 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
# =============================================================================
# TelemetryFlow Hermes - Dockerfile
# =============================================================================
#
# TelemetryFlow Hermes - TelemetryFlow Observability
# AI-Powered Observability & Incident Response Management (IRM) Platform
# Copyright (c) 2024-2026 Telemetri Data Indonesia. All rights reserved.
#
# Single-stage build for minimal image size with aggressive CVE patching.
# Uses Debian Trixie (13) base for patched system libraries and strips
# attack-surface packages including pip, tar, mount, and gpg.
#
# Hermes is a Python stdlib-only agent — no pip dependencies required.
# =============================================================================
FROM python:3.13-slim-trixie
ARG VERSION=1.2.0
ARG GIT_COMMIT=unknown
ARG GIT_BRANCH=unknown
ARG BUILD_TIME=unknown
LABEL org.opencontainers.image.title="TelemetryFlow Hermes" \
org.opencontainers.image.description="Self-improving AI agent integration for TelemetryFlow Observability Platform" \
org.opencontainers.image.version="1.2.0" \
org.opencontainers.image.vendor="TelemetryFlow" \
org.opencontainers.image.authors="Telemetri Data Indonesia <support@telemetryflow.id>" \
org.opencontainers.image.url="https://telemetryflow.id" \
org.opencontainers.image.documentation="https://docs.telemetryflow.id" \
org.opencontainers.image.source="https://github.com/telemetryflow/telemetryflow-hermes" \
org.opencontainers.image.licenses="Apache-2.0" \
org.opencontainers.image.base.name="python:3.13-slim-trixie" \
io.telemetryflow.product="TelemetryFlow Hermes" \
io.telemetryflow.component="telemetryflow-hermes" \
io.telemetryflow.platform="CEOP"
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
TELEMETRYFLOW_API_URL=http://localhost:3000 \
TELEMETRYFLOW_ENVIRONMENT=production
RUN apt-get update && \
apt-get dist-upgrade -y && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
RUN groupadd -g 10001 telemetryflow && \
useradd -u 10001 -g telemetryflow -d /home/telemetryflow -m telemetryflow
RUN dpkg --remove --force-remove-essential --force-depends \
perl-base \
libperl5.40 \
perl-modules-5.40 \
ncurses-bin \
libncurses6 \
libncursesw6 \
ncurses-base \
libtinfo6 \
gnupg \
gnupg-utils \
gpg \
gpgv \
gpg-wks-client \
gpg-wks-server \
dirmngr \
libldap-common \
libldap-2.5-0 \
libcurl4 \
curl \
binutils \
binutils-common \
libbinutils \
libctf0 \
libctf-nobfd0 \
tar \
mount \
bzip2 \
login \
passwd \
util-linux \
libmount1 \
libblkid1 \
libuuid1 \
libfdisk1 \
libsmartcols1 \
e2fsprogs \
libext2fs2 \
|| true
RUN python -m pip uninstall -y pip setuptools wheel && \
rm -rf /usr/local/lib/python3.13/ensurepip \
/usr/local/lib/python3.13/site-packages/pip* \
/usr/local/lib/python3.13/site-packages/setuptools* \
/usr/local/lib/python3.13/site-packages/wheel* \
/usr/local/bin/pip* \
/usr/local/lib/python3.13/idlelib \
/usr/local/lib/python3.13/pydoc_data \
/usr/local/lib/python3.13/unittest \
/usr/local/lib/python3.13/lib2to3
RUN apt-get autoremove -y --purge 2>/dev/null || true \
&& apt-get clean 2>/dev/null || true \
&& rm -rf \
/var/lib/apt/lists/* \
/tmp/* \
/var/tmp/* \
/usr/share/doc/* \
/usr/share/man/* \
/usr/share/info/* \
/var/log/* \
/var/cache/* \
/usr/lib/*/libgcrypt* \
/usr/lib/*/libsasl2*
COPY --chown=telemetryflow:telemetryflow plugins/ /app/plugins/
COPY --chown=telemetryflow:telemetryflow profiles/ /app/profiles/
COPY --chown=telemetryflow:telemetryflow skills/ /app/skills/
COPY --chown=telemetryflow:telemetryflow hooks/ /app/hooks/
COPY --chown=telemetryflow:telemetryflow cron/ /app/cron/
COPY --chown=telemetryflow:telemetryflow config.yaml /app/config.yaml
COPY --chown=telemetryflow:telemetryflow SOUL.md /app/SOUL.md
COPY --chown=telemetryflow:telemetryflow docker-entrypoint.py /app/docker-entrypoint.py
USER telemetryflow
WORKDIR /app
ENTRYPOINT ["python3", "/app/docker-entrypoint.py"]
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
CMD python3 /app/docker-entrypoint.py --check