From a9cd2e176f5da4e8a7d74cfb455bd894e8c53410 Mon Sep 17 00:00:00 2001 From: Jan Safranek Date: Thu, 6 Jun 2019 10:43:57 +0200 Subject: [PATCH] UPSTREAM: : Add OpenShift Dockerfiles --- Dockerfile.openshift | 10 ++++++++++ Dockerfile.openshift.rhel7 | 10 ++++++++++ 2 files changed, 20 insertions(+) create mode 100644 Dockerfile.openshift create mode 100644 Dockerfile.openshift.rhel7 diff --git a/Dockerfile.openshift b/Dockerfile.openshift new file mode 100644 index 000000000..ad598396b --- /dev/null +++ b/Dockerfile.openshift @@ -0,0 +1,10 @@ +FROM registry.svc.ci.openshift.org/openshift/release:golang-1.11 AS builder +WORKDIR /go/src/github.com/kubernetes-csi/node-driver-registrar +COPY . . +RUN go build ./cmd/csi-node-driver-registrar + +FROM registry.svc.ci.openshift.org/openshift/origin-v4.0:base +COPY --from=builder /go/src/github.com/kubernetes-csi/node-driver-registrar/csi-node-driver-registrar /usr/bin/ +RUN useradd csi-node-driver-registrar +USER csi-node-driver-registrar +ENTRYPOINT ["/usr/bin/csi-node-driver-registrar"] diff --git a/Dockerfile.openshift.rhel7 b/Dockerfile.openshift.rhel7 new file mode 100644 index 000000000..42037f394 --- /dev/null +++ b/Dockerfile.openshift.rhel7 @@ -0,0 +1,10 @@ +FROM registry.svc.ci.openshift.org/ocp/builder:golang-1.11 AS builder +WORKDIR /go/src/github.com/kubernetes-csi/node-driver-registrar +COPY . . +RUN go build ./cmd/csi-node-driver-registrar + +FROM registry.svc.ci.openshift.org/ocp/4.0:base +COPY --from=builder /go/src/github.com/kubernetes-csi/node-driver-registrar/csi-node-driver-registrar /usr/bin/ +RUN useradd csi-node-driver-registrar +USER csi-node-driver-registrar +ENTRYPOINT ["/usr/bin/csi-node-driver-registrar"]