-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
67 lines (61 loc) · 1.99 KB
/
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
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
# Main image
FROM docker.io/library/debian:bookworm-20241016
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
# Install packages
RUN DEBIAN_FRONTEND=noninteractive \
apt-get update \
&& \
apt-get install -y --no-install-recommends \
build-essential=12.9 \
ca-certificates=20230311 \
curl=7.88.1-10+deb12u7 \
gnupg=2.2.40-1.1 \
gnupg1=1.4.23-1.1+b1 \
gnupg2=2.2.40-1.1 \
libpq-dev=15.8-0+deb12u1 \
lm-sensors=1:3.6.0-7.1 \
musl=1.2.3-1 \
postgresql-common=248 \
python3-dev=3.11.2-1+b1 \
python3-pip=23.0.1+dfsg-1 \
python3-setuptools=66.1.1-1 \
snmp=5.9.3+dfsg-2 \
xz-utils=5.4.1-0.2 \
&& \
apt-get clean \
&& \
rm -rf /var/lib/apt/lists/*
ENV PYTHONUNBUFFERED=1 \
PYTHONIOENCODING=UTF-8 \
LC_ALL=en_US.UTF-8 \
LANG=en_US.UTF-8 \
XDG_CONFIG_HOME=/config \
TELEGRAF_INTERVAL=1200 \
INFLUXDB_DATABASE=stockdata
# FIXME: hadolint ignore
# hadolint ignore=SC2002
RUN DEBIAN_FRONTEND=noninteractive \
curl -s https://repos.influxdata.com/influxdata-archive_compat.key > influxdata-archive_compat.key \
&& \
echo '393e8779c89ac8d958f81f942f9ad7fb82a25e133faddaf92e15b16e6ac9ce4c influxdata-archive_compat.key' | sha256sum -c && cat influxdata-archive_compat.key | gpg --dearmor > /etc/apt/trusted.gpg.d/influxdata-archive_compat.gpg \
&& \
echo 'deb [signed-by=/etc/apt/trusted.gpg.d/influxdata-archive_compat.gpg] https://repos.influxdata.com/debian stable main' > /etc/apt/sources.list.d/influxdata.list \
&& \
rm -f influxdata-archive_compat.key \
&& \
apt-get update \
&& \
apt-get install -y --no-install-recommends \
telegraf=1.31.1-1 \
&& \
apt-get clean \
&& \
rm -rf /var/lib/apt/lists/*
# Install Python packages
COPY rootfs/usr/src/app/requirements.txt /usr/src/app/requirements.txt
RUN python3 -m pip install --no-cache-dir --break-system-packages -r /usr/src/app/requirements.txt
# add local files
COPY rootfs/ /
# set entrypoint and command
ENTRYPOINT ["custom-entrypoint"]
CMD ["/usr/bin/telegraf"]