Skip to content

Commit

Permalink
Merge pull request #18 from infrawatch/migrate-ubi8-master
Browse files Browse the repository at this point in the history
Migrate to UBI8 base image
  • Loading branch information
leifmadsen authored Dec 1, 2020
2 parents eda73be + 3752045 commit ed27fbb
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 ed27fbb

Please sign in to comment.