FROM debian:11 AS builder ENV DEBIAN_FRONTEND=noninteractive RUN apt-get -y update RUN apt-get -y install\ snmp snmpd snmptrapd \ libsnmp-dev \ gcc \ make \ uuid-dev RUN ln -s /usr/lib/libuuid.so.1.3.0 /usr/lib/libuuid.so WORKDIR /home COPY ./src/* /home/src/ WORKDIR /home/src/ RUN make -f Makefile FROM builder AS deployment-env COPY ./mibs/* /usr/share/snmp/mibs/ COPY --from=builder /home/src/libsnmpAuditPlugin.so /usr/lib/ EXPOSE 161/udp EXPOSE 162/udp EXPOSE 705/tcp CMD /usr/sbin/snmpd $OPTIONDEBUG -f