
CentOS 8 has been vaulted. We need to fix the yum urls to continue to use it. A longer term fix is to migrate to a new/different base image, but is outside the scope of this fix which only addresses broken builds. Closes-bug: 1959694 Signed-off-by: Scott Little <scott.little@windriver.com> Change-Id: Id8b32ee27a65f74c616b07e37f8f5f2914176264
28 lines
788 B
Docker
28 lines
788 B
Docker
FROM centos:8 AS builder
|
|
RUN sed -i -e 's%^mirrorlist=%#mirrorlist=%' -e 's%^#baseurl=http://mirror%baseurl=https://vault%' /etc/yum.repos.d/*repo
|
|
RUN yum -y update && yum upgrade
|
|
RUN yum -y install\
|
|
net-snmp-libs \
|
|
net-snmp-devel \
|
|
make
|
|
|
|
RUN dnf -y --enablerepo=powertools install json-c-devel
|
|
WORKDIR /home/trapagent
|
|
COPY src/* ./src/
|
|
COPY Makefile .
|
|
RUN make
|
|
|
|
|
|
FROM centos:8
|
|
RUN sed -i -e 's%^mirrorlist=%#mirrorlist=%' -e 's%^#baseurl=http://mirror%baseurl=https://vault%' /etc/yum.repos.d/*repo
|
|
RUN yum -y update && yum upgrade
|
|
RUN yum -y install\
|
|
net-snmp \
|
|
net-snmp-utils
|
|
|
|
WORKDIR /home/trapagent
|
|
COPY --from=builder /home/trapagent/wrsAlarmMIB .
|
|
COPY bootstrap.sh .
|
|
RUN chmod 755 ./bootstrap.sh
|
|
ENTRYPOINT ["./bootstrap.sh"]
|