Skip to content

Commit

Permalink
Migrate to UBI8 base image
Browse files Browse the repository at this point in the history
  • Loading branch information
leifmadsen committed Dec 1, 2020
1 parent eda73be commit 3752045
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 12 deletions.
25 changes: 13 additions & 12 deletions build/Dockerfile
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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"
6 changes: 6 additions & 0 deletions build/repos/opstools.repo
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 3752045

Please sign in to comment.