
This change reorganizes the source directories of the stx-fm-subagent container to be reused by both CentOS and Debian Dockerfiles in order to build the images having the corresponding OS-specic base. Test plan: PASS: Debian - Build Debian docker image and upload/apply snmp-app changing the stx-fm-trap-subagent references to point to the new image. Verified that the app is applied, and the container is created. PASS: Verified common snmp scenarios: - test snmpwalk for 2c and 3 snmp version - test snmpget for 2c and 3 snmp version - verified traps are working as expected. PASS: CentOS - Same tests have been done building a CentOS container. Story: 2009831 Task: 45731 Signed-off-by: Enzo Candotti <enzo.candotti@windriver.com> Change-Id: I962a526ad47ce320a0048e591f689453ca15cc23
22 lines
467 B
Docker
22 lines
467 B
Docker
FROM debian AS base
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
RUN apt-get -y update
|
|
RUN apt-get -y install\
|
|
snmp snmpd snmptrapd \
|
|
libjson-c-dev \
|
|
libsnmp-dev \
|
|
gcc \
|
|
make
|
|
|
|
WORKDIR /home/trapagent
|
|
COPY src/* ./src/
|
|
COPY Makefile .
|
|
RUN make
|
|
|
|
FROM base AS deployment-env
|
|
WORKDIR /home/trapagent
|
|
COPY --from=base /home/trapagent/wrsAlarmMIB .
|
|
COPY bootstrap.sh .
|
|
RUN chmod 755 ./bootstrap.sh
|
|
ENTRYPOINT ["./bootstrap.sh"]
|