Skip to content

Commit

Permalink
Merge pull request #121 from maiqueb/bump-openshift-build-img
Browse files Browse the repository at this point in the history
build: update openshift build image to golang 1.15
  • Loading branch information
dougbtv authored Jul 8, 2021
2 parents aec29ad + bc3d80c commit f1047ee
Showing 1 changed file with 3 additions and 16 deletions.
19 changes: 3 additions & 16 deletions Dockerfile.openshift
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
# This dockerfile is used for building for OpenShift
FROM openshift/origin-release:rhel-8-golang-1.12 as rhel8
ADD . /go/src/github.com/dougbtv/whereabouts
WORKDIR /go/src/github.com/dougbtv/whereabouts
ENV CGO_ENABLED=1
ENV GO111MODULE=on
ENV VERSION=rhel8 COMMIT=unset
RUN go build -mod vendor -o bin/whereabouts cmd/whereabouts.go
WORKDIR /

FROM openshift/origin-release:rhel-7-golang-1.12 as rhel7
FROM openshift/origin-release:golang-1.15 as builder
ADD . /go/src/github.com/dougbtv/whereabouts
WORKDIR /go/src/github.com/dougbtv/whereabouts
ENV CGO_ENABLED=1
Expand All @@ -18,12 +9,8 @@ WORKDIR /

FROM openshift/origin-base
RUN mkdir -p /usr/src/whereabouts/images && \
mkdir -p /usr/src/whereabouts/bin && \
mkdir -p /usr/src/whereabouts/rhel7/bin && \
mkdir -p /usr/src/whereabouts/rhel8/bin
COPY --from=rhel7 /go/src/github.com/dougbtv/whereabouts/bin/whereabouts /usr/src/whereabouts/rhel7/bin
COPY --from=rhel7 /go/src/github.com/dougbtv/whereabouts/bin/whereabouts /usr/src/whereabouts/bin
COPY --from=rhel8 /go/src/github.com/dougbtv/whereabouts/bin/whereabouts /usr/src/whereabouts/rhel8/bin
mkdir -p /usr/src/whereabouts/bin
COPY --from=builder /go/src/github.com/dougbtv/whereabouts/bin/whereabouts /usr/src/whereabouts/bin

LABEL org.opencontainers.image.source https://github.com/k8snetworkplumbingwg/whereabouts
LABEL io.k8s.display-name="Whereabouts CNI" \
Expand Down

0 comments on commit f1047ee

Please sign in to comment.