-
Notifications
You must be signed in to change notification settings - Fork 33
/
Dockerfile.openshift
36 lines (33 loc) · 2.07 KB
/
Dockerfile.openshift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.22-openshift-4.18 AS rhel9
ADD . /go/src/github.com/openshift/whereabouts
WORKDIR /go/src/github.com/openshift/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 registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.22-openshift-4.18 AS rhel8
ADD . /go/src/github.com/openshift/whereabouts
WORKDIR /go/src/github.com/openshift/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 registry.ci.openshift.org/ocp/builder:rhel-9-base-openshift-4.18
RUN mkdir -p /usr/src/whereabouts/images && \
mkdir -p /usr/src/whereabouts/bin && \
mkdir -p /usr/src/whereabouts/rhel9/bin && \
mkdir -p /usr/src/whereabouts/rhel8/bin
COPY --from=rhel8 /go/src/github.com/openshift/whereabouts/entrypoint.sh /usr/src/whereabouts/bin
COPY --from=rhel8 /go/src/github.com/openshift/whereabouts/bin/whereabouts /usr/src/whereabouts/bin
COPY --from=rhel8 /go/src/github.com/openshift/whereabouts/bin/ip-control-loop /usr/src/whereabouts/bin
COPY --from=rhel9 /go/src/github.com/openshift/whereabouts/bin/whereabouts /usr/src/whereabouts/rhel9/bin
COPY --from=rhel9 /go/src/github.com/openshift/whereabouts/bin/ip-control-loop /usr/src/whereabouts/rhel9/bin
COPY --from=rhel8 /go/src/github.com/openshift/whereabouts/bin/whereabouts /usr/src/whereabouts/rhel8/bin
COPY --from=rhel8 /go/src/github.com/openshift/whereabouts/bin/ip-control-loop /usr/src/whereabouts/rhel8/bin
LABEL org.opencontainers.image.source https://github.com/openshift/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 <[email protected]>"