Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from smarterclayton/rhel7
ADd a RHEL7 dockerfile and standardize format
- Loading branch information
Showing
2 changed files
with
14 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/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"] |