-
Notifications
You must be signed in to change notification settings - Fork 0
/
DOCKERFILE
33 lines (28 loc) · 1.42 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
FROM alpine:3.8
RUN echo 'hosts: files dns' >> /etc/nsswitch.conf
RUN apk add --no-cache iputils ca-certificates net-snmp-tools snmp procps lm_sensors && \
update-ca-certificates
ENV TELEGRAF_VERSION 1.9.2
RUN set -ex && \
apk add --no-cache --virtual .build-deps wget gnupg tar && \
for key in \
05CE15085FC09D18E99EFB22684A14CF2582E0C5 ; \
do \
gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$key" || \
gpg --keyserver pgp.mit.edu --recv-keys "$key" || \
gpg --keyserver keyserver.pgp.com --recv-keys "$key" ; \
done && \
wget --no-verbose https://dl.influxdata.com/telegraf/releases/telegraf-${TELEGRAF_VERSION}-static_linux_amd64.tar.gz.asc && \
wget --no-verbose https://dl.influxdata.com/telegraf/releases/telegraf-${TELEGRAF_VERSION}-static_linux_amd64.tar.gz && \
gpg --batch --verify telegraf-${TELEGRAF_VERSION}-static_linux_amd64.tar.gz.asc telegraf-${TELEGRAF_VERSION}-static_linux_amd64.tar.gz && \
mkdir -p /usr/src /etc/telegraf && \
tar -C /usr/src -xzf telegraf-${TELEGRAF_VERSION}-static_linux_amd64.tar.gz && \
mv /usr/src/telegraf*/telegraf.conf /etc/telegraf/ && \
chmod +x /usr/src/telegraf*/* && \
cp -a /usr/src/telegraf*/* /usr/bin/ && \
rm -rf *.tar.gz* /usr/src /root/.gnupg && \
apk del .build-deps
EXPOSE 8125/udp 8092/udp 8094 8086
COPY entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
CMD ["telegraf"]