Gonzalo Gallardo 67e1939509 Upload fm-subagent, fm-trap-subagent and armada plugin.
Upload fm-subagent and fm-trap-subagent to our snmp armada
application integrated with armada plugin.

Change-Id: I2c7b3a65f2e97c147068d0c3c41c52e814bb0e2e
Story: 2008132
Task: 41227
Signed-off-by: Gonzalo Gallardo <gonzalo.gallardo@windriver.com>
2020-11-27 17:00:30 -03:00

46 lines
1.0 KiB
Docker

ARG BASE
FROM ${BASE} AS stx
RUN yum -y update
RUN yum -y install\
fm-common \
fm-common-dev
FROM centos:7 AS base
RUN yum -y install\
net-snmp \
net-snmp-utils \
python3-setuptools \
libpython2.7 \
python3-devel \
postgresql
WORKDIR /home/sub-agent
COPY --from=stx /usr/lib64/libfmcommon.so.1.0 /usr/lib64/
RUN ln -s /usr/lib64/libfmcommon.so.1.0 /usr/lib64/libfmcommon.so
RUN ln -s /usr/lib64/libfmcommon.so.1.0 /usr/lib64/libfmcommon.so.1
FROM base AS builder
RUN yum -y install\
net-snmp-libs \
net-snmp-devel\
gcc \
make \
uuid
RUN ln -s /usr/lib64/libuuid.so.1.3.0 /usr/lib64/libuuid.so
COPY Makefile .
COPY ./src/* ./src/
COPY --from=stx /usr/include/fmDbAPI.h /usr/include/
COPY --from=stx /usr/include/fmAPI.h /usr/include/
RUN make
FROM base AS deployment-env
COPY --from=builder /home/sub-agent/snmpSubAgent .
COPY bootstrap.sh .
RUN chmod 755 bootstrap.sh
ENTRYPOINT ["./bootstrap.sh"]