From 3752045ad92760ee116075fb06ccbe6b3047e8d2 Mon Sep 17 00:00:00 2001 From: Leif Madsen Date: Tue, 1 Dec 2020 16:41:05 -0500 Subject: [PATCH] Migrate to UBI8 base image --- build/Dockerfile | 25 +++++++++++++------------ build/repos/opstools.repo | 6 ++++++ 2 files changed, 19 insertions(+), 12 deletions(-) create mode 100644 build/repos/opstools.repo diff --git a/build/Dockerfile b/build/Dockerfile index 076f7cc..16455b4 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -1,11 +1,12 @@ # --- Build the bridge -FROM centos:8 AS builder +FROM registry.access.redhat.com/ubi8 AS builder -RUN yum install epel-release -y && \ - yum update -y --setopt=tsflags=nodocs && \ - yum install qpid-proton-c-devel --setopt=tsflags=nodocs -y && \ +# dependencies for qpid-proton-c +COPY build/repos/opstools.repo /etc/yum.repos.d/opstools.repo + +RUN dnf install qpid-proton-c-devel --setopt=tsflags=nodocs -y && \ dnf install gcc make -y && \ - yum clean all + dnf clean all ENV D=/home/bridge @@ -16,18 +17,18 @@ RUN make && \ mv bridge /tmp/ # --- end build, create bridge runtime layer --- -FROM centos:8 +FROM registry.access.redhat.com/ubi8 -LABEL io.k8s.display-name="SmartGateway AMQP Bridge" \ - io.k8s.description="Reads data from AMQP via proton and writes to a unix or UDP socket" +# dependencies for qpid-proton-c +COPY build/repos/opstools.repo /etc/yum.repos.d/opstools.repo -RUN yum install epel-release -y && \ - yum update -y --setopt=tsflags=nodocs && \ - yum install qpid-proton-c --setopt=tsflags=nodocs -y && \ - yum clean all && \ +RUN dnf install qpid-proton-c --setopt=tsflags=nodocs -y && \ + dnf clean all && \ rm -rf /var/cache/yum COPY --from=builder /tmp/bridge / ENTRYPOINT ["/bridge"] +LABEL io.k8s.display-name="SmartGateway AMQP Bridge" \ + io.k8s.description="Reads data from AMQP via proton and writes to a unix or UDP socket" diff --git a/build/repos/opstools.repo b/build/repos/opstools.repo new file mode 100644 index 0000000..6d2b409 --- /dev/null +++ b/build/repos/opstools.repo @@ -0,0 +1,6 @@ +[centos-opstools] +name=opstools +baseurl=http://mirror.centos.org/centos/8/opstools/$basearch/collectd-5/ +gpgcheck=0 +enabled=1 +module_hotfixes=1