Skip to content

Commit

Permalink
Merge pull request kubernetes-csi#3 from smarterclayton/rhel7
Browse files Browse the repository at this point in the history
ADd a RHEL7 dockerfile and standardize format
  • Loading branch information
openshift-merge-robot authored Nov 14, 2018
2 parents 6f56c67 + bba7664 commit cf12791
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 9 deletions.
15 changes: 6 additions & 9 deletions Dockerfile.openshift
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
FROM openshift/origin-release:golang-1.10
COPY . /go/src/github.com/kubernetes-csi/external-provisioner/
RUN cd /go/src/github.com/kubernetes-csi/external-provisioner/ && \
go build ./cmd/csi-provisioner

FROM centos:7

COPY --from=0 /go/src/github.com/kubernetes-csi/external-provisioner/csi-provisioner /usr/bin/
FROM registry.svc.ci.openshift.org/openshift/release:golang-1.10 AS builder
WORKDIR /go/src/github.com/kubernetes-csi/external-provisioner
COPY . .
RUN go build ./cmd/csi-provisioner

FROM registry.svc.ci.openshift.org/openshift/origin-v4.0:base
COPY --from=builder /go/src/github.com/kubernetes-csi/external-provisioner/csi-provisioner /usr/bin/
RUN useradd csi-provisioner
USER csi-provisioner

ENTRYPOINT ["/usr/bin/csi-provisioner"]
10 changes: 10 additions & 0 deletions Dockerfile.openshift.rhel7
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM registry.svc.ci.openshift.org/ocp/builder:golang-1.10 AS builder
WORKDIR /go/src/github.com/kubernetes-csi/external-provisioner
COPY . .
RUN go build ./cmd/csi-provisioner

FROM registry.svc.ci.openshift.org/ocp/4.0:base
COPY --from=builder /go/src/github.com/kubernetes-csi/external-provisioner/csi-provisioner /usr/bin/
RUN useradd csi-provisioner
USER csi-provisioner
ENTRYPOINT ["/usr/bin/csi-provisioner"]

0 comments on commit cf12791

Please sign in to comment.