-
Notifications
You must be signed in to change notification settings - Fork 124
/
Dockerfile.openshift
21 lines (19 loc) · 1.12 KB
/
Dockerfile.openshift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# This dockerfile is used for building for OpenShift
FROM registry.ci.openshift.org/openshift/release:golang-1.22 as builder
ADD . /go/src/github.com/k8snetworkplumbingwg/whereabouts
WORKDIR /go/src/github.com/k8snetworkplumbingwg/whereabouts
ENV CGO_ENABLED=1
ENV GO111MODULE=on
RUN go build -mod vendor -o bin/whereabouts cmd/whereabouts.go
RUN go build -mod vendor -o bin/ip-control-loop cmd/controlloop/controlloop.go
WORKDIR /
FROM openshift/origin-base
RUN mkdir -p /usr/src/whereabouts/images && \
mkdir -p /usr/src/whereabouts/bin
COPY --from=builder /go/src/github.com/k8snetworkplumbingwg/whereabouts/bin/whereabouts /usr/src/whereabouts/bin
COPY --from=builder /go/src/github.com/k8snetworkplumbingwg/whereabouts/bin/ip-control-loop /usr/src/whereabouts/bin
LABEL org.opencontainers.image.source https://github.com/k8snetworkplumbingwg/whereabouts
LABEL io.k8s.display-name="Whereabouts CNI" \
io.k8s.description="This is a component of OpenShift Container Platform and provides a cluster-wide IPAM CNI plugin." \
io.openshift.tags="openshift" \
maintainer="CTO Networking <nfvpe-container@redhat.com>"