FROM telegraf:latest
LABEL org.opencontainers.image.authors="dockerimage@dresi.wtf"

RUN apt-get update && \
    apt-get install -y --no-install-recommends wget && \
    wget -q -O /usr/share/snmp/mibs/UBNT-MIB \
      https://raw.githubusercontent.com/librenms/librenms/master/mibs/ubiquiti/UBNT-MIB && \
    wget -q -O /usr/share/snmp/mibs/UBNT-UniFi-MIB \
      https://raw.githubusercontent.com/librenms/librenms/master/mibs/ubiquiti/UBNT-UniFi-MIB && \
    echo "mibs +ALL" >> /etc/snmp/snmp.conf && \
    apt-get remove -y wget && \
    apt-get clean autoclean && \
    apt-get autoremove -y && \
    rm -rf /var/lib/{apt,dpkg,cache,log}/
