forked from openshift/egress-router-cni
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.rhel8
24 lines (22 loc) · 1.38 KB
/
Dockerfile.rhel8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.15-openshift-4.8 AS rhel8
ADD . /go/src/github.com/openshift/egress-router-cni
WORKDIR /go/src/github.com/openshift/egress-router-cni
ENV GO111MODULE=on
ENV VERSION=rhel8 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-7-golang-1.15-openshift-4.8 AS rhel7
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.8:base
RUN mkdir -p /usr/src/egress-router-cni/bin/ && \
mkdir -p /usr/src/egress-router-cni/rhel7/bin && \
mkdir -p /usr/src/egress-router-cni/rhel8/bin
COPY --from=rhel7 /go/src/github.com/openshift/egress-router-cni/bin/egress-router /usr/src/egress-router-cni/rhel7/bin/egress-router
COPY --from=rhel8 /go/src/github.com/openshift/egress-router-cni/bin/egress-router /usr/src/egress-router-cni/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]>"