Skip to content
Permalink
Browse files

[dockerfile] Adds Dockerfile.rhel for OpenShift build

  • Loading branch information...
dougbtv authored and s1061123 committed Dec 5, 2018
1 parent a9b40c7 commit e5e020f6a3d72facd0741c78e5983b0ab585fb21
Showing with 29 additions and 8 deletions.
  1. +1 −8 Dockerfile
  2. +28 −0 Dockerfile.rhel
@@ -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"]
@@ -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"]

1 comment on commit e5e020f

@micw

This comment has been minimized.

Copy link
Contributor

micw commented on e5e020f Dec 15, 2018

Hi,
is there a special reason to create a similar docker image but on RHEL? If it's because the lib dependencies, please have a look at my PR #214 - it links the binary static so it should work on any linux.

Please sign in to comment.
You can’t perform that action at this time.