-
Notifications
You must be signed in to change notification settings - Fork 1
/
Telegraf-Dockerfile
23 lines (21 loc) · 1.2 KB
/
Telegraf-Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
FROM telegraf
RUN export DEBIAN_FRONTEND=noninteractive && \
export DEBIAN_RELEASE=$(awk -F'[" ]' '/VERSION=/{print $3}' /etc/os-release | tr -cd '[[:alnum:]]._-' ) && \
echo "remove main from /etc/apt/sources.list" && \
sed -i '/main/d' /etc/apt/sources.list && \
echo "remove contrib from /etc/apt/sources.list" && \
sed -i '/contrib/d' /etc/apt/sources.list && \
echo "remove non-free from /etc/apt/sources.list" && \
sed -i '/non-free/d' /etc/apt/sources.list && \
echo "deb http://httpredir.debian.org/debian ${DEBIAN_RELEASE} main contrib non-free" >> /etc/apt/sources.list && \
echo "deb http://httpredir.debian.org/debian ${DEBIAN_RELEASE}-updates main contrib non-free" >> /etc/apt/sources.list && \
echo "deb http://security.debian.org ${DEBIAN_RELEASE}/updates main contrib non-free" >> /etc/apt/sources.list && \
set -x &&\
apt-get update && \
apt-get -y install snmp-mibs-downloader && \
rm -r /var/lib/apt/lists/*
RUN mkdir /snmp
WORKDIR /snmp
RUN wget -O ./snmp-mibs.tgz --no-cache https://www.juniper.net/documentation/software/junos/junos123/juniper-mibs-12.3R12.4.tgz
RUN tar xzfv ./snmp-mibs.tgz
RUN mv JuniperMibs/* /usr/share/snmp/mibs/