-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
29 lines (22 loc) · 1.5 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
FROM python:3.9.19-slim-bullseye
COPY --chown=1000:0 nuocd /opt/nuocd
WORKDIR /opt/nuocd
COPY --chown=1000:0 requirements.txt ./requirements.txt
RUN pip install --no-cache-dir -r requirements.txt && \
apt-get update -y && \
apt-get install -y gettext-base apt-transport-https curl gnupg procps && \
# influxdata-archive_compat.key GPG Fingerprint: 9D539D90D3328DC7D6C8D3B9D8FF8E1F7DF8B07E
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 && \
apt-get update -y && \
useradd -d /opt/nuocd -g 0 -u 1000 -s /bin/false telegraf && \
apt-get -y install telegraf=1.31.0-1 && \
apt-get clean
RUN chmod g+w /etc
COPY --chown=telegraf:0 conf/telegraf.conf /etc/telegraf/telegraf.conf
COPY --chown=telegraf:0 conf/nuodb.conf /etc/telegraf/telegraf.d/static/nuodb.conf
COPY --chown=telegraf:0 conf/outputs.conf /etc/telegraf/telegraf.d/dynamic/outputs.conf
COPY --chown=telegraf:0 bin/nuocd /usr/local/bin/nuocd
USER 1000:0
CMD ["telegraf", "--config", "/etc/telegraf/telegraf.conf", "--config-directory", "/etc/telegraf/telegraf.d"]