File tree 2 files changed +54
-4
lines changed
2 files changed +54
-4
lines changed Original file line number Diff line number Diff line change
1
+ # ---------- RHEL8 ----------
2
+ FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.23-openshift-4.19 AS builder-rhel8
3
+
4
+ RUN mkdir /workdir
5
+ WORKDIR /workdir
6
+
7
+ COPY . .
8
+
9
+ ENV GOOS linux
10
+ # Support overriding target GOARCH during `make docker-build`
11
+ ARG goarch=amd64
12
+ ENV GOARCH=$goarch
13
+ ENV CGO_ENABLED 1
14
+ ENV GOFLAGS -mod=vendor
15
+
16
+ RUN mkdir /workdir/bin
17
+ RUN go build -o /workdir/bin/ovs ./cmd/plugin
18
+
19
+ # ---------- RHEL9 ----------
20
+ FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.23-openshift-4.19 AS builder-rhel9
21
+
22
+ RUN mkdir /workdir
23
+ WORKDIR /workdir
24
+
25
+ COPY . .
26
+
27
+ ENV GOOS linux
28
+ # Support overriding target GOARCH during `make docker-build`
29
+ ARG goarch=amd64
30
+ ENV GOARCH=$goarch
31
+ ENV CGO_ENABLED 1
32
+ ENV GOFLAGS -mod=vendor
33
+
34
+ RUN mkdir /workdir/bin
35
+ RUN go build -o /workdir/bin/ovs ./cmd/plugin
36
+ RUN go build -o /workdir/bin/marker ./cmd/marker
37
+ RUN go build -o /workdir/bin/ovs-mirror-producer ./cmd/mirror-producer
38
+ RUN go build -o /workdir/bin/ovs-mirror-consumer ./cmd/mirror-consumer
39
+
40
+ # ---------- Run container ----------
41
+ FROM registry.ci.openshift.org/ocp/4.19:base-rhel9
42
+
43
+ COPY --from=builder-rhel9 /workdir/bin/* /
44
+
45
+ RUN mkdir /usr/bin/rhel9
46
+ COPY --from=builder-rhel9 /workdir/bin/ovs /usr/bin/rhel9
47
+ RUN mkdir /usr/bin/rhel8
48
+ COPY --from=builder-rhel8 /workdir/bin/ovs /usr/bin/rhel8
49
+
50
+ WORKDIR /
51
+
52
+ LABEL io.k8s.display-name="OVS CNI"
Original file line number Diff line number Diff line change 1
1
approvers:
2
- - AlonaKaplan
3
2
- phoracek
4
3
- SchSeba
4
+ - zeeke
5
5
reviewers:
6
- - AlonaKaplan
7
- - EdDev
8
6
- phoracek
9
- - rhrazdil
10
7
- SchSeba
8
+ - zeeke
You can’t perform that action at this time.
0 commit comments