Skip to content

Commit

Permalink
Add a RHEL7 dockerfile and standarize format
Browse files Browse the repository at this point in the history
  • Loading branch information
smarterclayton committed Nov 11, 2018
1 parent 6a4e22e commit fe8e7b2
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/livenessprobe/
RUN cd /go/src/github.com/kubernetes-csi/livenessprobe/ && \
go build -o livenessprobe ./cmd

FROM centos:7

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

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

ENTRYPOINT ["/usr/bin/livenessprobe"]
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/livenessprobe
COPY . .
RUN go build -o livenessprobe ./cmd

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

0 comments on commit fe8e7b2

Please sign in to comment.