Skip to content

Commit

Permalink
Merge pull request #11 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 committed Nov 14, 2018
2 parents 0085c0f + d05e7c4 commit e7be3d9
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 19 deletions.
23 changes: 4 additions & 19 deletions Dockerfile
@@ -1,25 +1,10 @@
# Reproducible builder image
FROM openshift/origin-release:golang-1.10 as builder

# Workaround a bug in imagebuilder (some versions) where this dir will not be auto-created.
RUN mkdir -p /go/src/github.com/openshift/cluster-autoscaler-operator
FROM registry.svc.ci.openshift.org/openshift/release:golang-1.10 AS builder
WORKDIR /go/src/github.com/openshift/cluster-autoscaler-operator

# This expects that the context passed to the docker build command is
# the cluster-autoscaler-operator directory.
# e.g. docker build -t <tag> -f <this_Dockerfile> <path_to_cluster-autoscaler-operator>
COPY . .

ENV NO_DOCKER=1
ENV GOPATH=/go
ENV BUILD_DEST=/go/bin/cluster-autoscaler-operator

RUN unset VERSION && make build

# Final container
FROM openshift/origin-base
RUN yum install -y ca-certificates

COPY --from=builder /go/bin/cluster-autoscaler-operator /

CMD ["/cluster-autoscaler-operator"]
FROM registry.svc.ci.openshift.org/openshift/origin-v4.0:base
COPY --from=builder # /go/bin/cluster-autoscaler-operator /usr/bin/
CMD ["/usr/bin/cluster-autoscaler-operator"]
10 changes: 10 additions & 0 deletions Dockerfile.rhel7
@@ -0,0 +1,10 @@
FROM registry.svc.ci.openshift.org/ocp/builder:golang-1.10 AS builder
WORKDIR /go/src/github.com/openshift/cluster-autoscaler-operator
COPY . .
ENV NO_DOCKER=1
ENV BUILD_DEST=/go/bin/cluster-autoscaler-operator
RUN unset VERSION && make build

FROM registry.svc.ci.openshift.org/ocp/4.0:base
COPY --from=builder # /go/bin/cluster-autoscaler-operator /usr/bin/
CMD ["/usr/bin/cluster-autoscaler-operator"]

0 comments on commit e7be3d9

Please sign in to comment.