-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathDockerfile.openshift
25 lines (23 loc) · 1.44 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
FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.22-openshift-4.17 AS rhel9
ADD . /go/src/github.com/openshift/egress-router-cni
WORKDIR /go/src/github.com/openshift/egress-router-cni
ENV GO111MODULE=on
ENV VERSION=rhel9 COMMIT=unset
RUN go build -mod vendor -o bin/egress-router cmd/egress-router/egress-router.go
FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.22-openshift-4.17 AS rhel8
ADD . /go/src/github.com/openshift/egress-router-cni
WORKDIR /go/src/github.com/openshift/egress-router-cni
ENV GO111MODULE=on
RUN go build -mod vendor -o bin/egress-router cmd/egress-router/egress-router.go
FROM registry.ci.openshift.org/ocp/4.16:base-rhel9
RUN dnf install -y util-linux && dnf clean all && \
mkdir -p /usr/src/egress-router-cni/bin/ && \
mkdir -p /usr/src/egress-router-cni/rhel8/bin && \
mkdir -p /usr/src/egress-router-cni/rhel9/bin
COPY --from=rhel9 /go/src/github.com/openshift/egress-router-cni/bin/egress-router /usr/src/egress-router-cni/bin/egress-router
COPY --from=rhel9 /go/src/github.com/openshift/egress-router-cni/bin/egress-router /usr/src/egress-router-cni/rhel9/bin/egress-router
COPY --from=rhel8 /go/src/github.com/openshift/egress-router-cni/bin/egress-router /usr/src/egress-router-cni/rhel8/bin/egress-router
LABEL io.k8s.display-name="Egress Router CNI" \
io.k8s.description="CNI Plugin for Egress Router" \
io.openshift.tags="openshift" \
maintainer="Daniel Mellado <[email protected]>"