[dockerfile] Adds Dockerfile.rhel for OpenShift build

This commit is contained in:
dougbtv
2018-12-04 21:08:09 -05:00
committed by Tomofumi Hayashi
parent a9b40c7841
commit e5e020f6a3
2 changed files with 29 additions and 8 deletions

View File

@@ -1,3 +1,4 @@
# This Dockerfile is used to build the image available on DockerHub
FROM centos:centos7
# Add everything
@@ -16,14 +17,6 @@ RUN rpm --import https://mirror.go-repo.io/centos/RPM-GPG-KEY-GO-REPO && \
WORKDIR /
LABEL io.k8s.display-name="Multus CNI" \
io.k8s.description="This is a component of OpenShift Container Platform and provides a meta CNI plugin." \
io.openshift.tags="openshift" \
maintainer="Doug Smith <dosmith@redhat.com>"
ADD ./images/entrypoint.sh /
# does it require a root user?
# USER 1001
ENTRYPOINT ["/entrypoint.sh"]

28
Dockerfile.rhel Normal file
View File

@@ -0,0 +1,28 @@
# This dockerfile is specific to building Multus for OpenShift
FROM rhel:rhel7
# Add everything
ADD . /usr/src/multus-cni
ENV INSTALL_PKGS "git golang"
RUN yum install -y $INSTALL_PKGS && \
rpm -V $INSTALL_PKGS && \
cd /usr/src/multus-cni && \
./build && \
yum autoremove -y $INSTALL_PKGS && \
yum clean all && \
rm -rf /tmp/*
WORKDIR /
LABEL io.k8s.display-name="Multus CNI" \
io.k8s.description="This is a component of OpenShift Container Platform and provides a meta CNI plugin." \
io.openshift.tags="openshift" \
maintainer="Doug Smith <dosmith@redhat.com>"
ADD ./images/entrypoint.sh /
# does it require a root user?
# USER 1001
ENTRYPOINT ["/entrypoint.sh"]