blob: 41561f0334a1eb6afbc5a00571c2b0e88dcbc906 [file] [log] [blame]
vexxhost-bota62d9312024-06-01 21:13:59 +02001# SPDX-License-Identifier: Apache-2.0
vexxhost-bot4a8f0912024-06-28 22:34:23 +02002# Atmosphere-Rebuild-Time: 2024-06-28T12:14:26Z
Mohammed Naserd28fbaf2024-04-08 17:15:00 -04003
Mohammed Naseraa212e62025-01-15 16:49:44 -05004ARG REGISTRY
Mohammed Naser19c6c8a2024-04-18 01:47:10 -04005ARG RELEASE
6
Yaguang Tangae1f4102024-12-13 22:27:22 +08007FROM harbor.atmosphere.dev/docker.io/library/golang:1.20 AS ovn-kubernetes
vexxhost-botb86c3372024-04-17 09:34:08 -04008ARG OVN_KUBERNETES_REF=5359e7d7f872058b6e5bf884c9f19d1922451f29
Mohammed Naserd28fbaf2024-04-08 17:15:00 -04009ADD https://github.com/ovn-org/ovn-kubernetes.git#${OVN_KUBERNETES_REF} /src
10COPY patches/ovn-kubernetes /patches/ovn-kubernetes
11RUN git -C /src apply --verbose /patches/ovn-kubernetes/*
12RUN <<EOF bash -xe
13cd /src/go-controller
14go build -o /usr/bin/ovn-kube-util ./cmd/ovn-kube-util
15EOF
16
Mohammed Naseraa212e62025-01-15 16:49:44 -050017FROM ${REGISTRY}/openvswitch:${RELEASE}
Yaguang Tangf0498452025-01-17 20:14:29 +080018ENV OVS_USER_ID=42424
Mohammed Naser25b395a2024-06-21 15:01:19 -040019ARG TARGETPLATFORM
20ADD --chmod=755 https://dl.k8s.io/release/v1.29.3/bin/${TARGETPLATFORM}/kubectl /usr/local/bin/kubectl
Mohammed Naserd28fbaf2024-04-08 17:15:00 -040021ARG OVN_SERIES=23.03
22ARG OVN_VERSION=${OVN_SERIES}.0-69
23RUN <<EOF sh -xe
24dnf -y --setopt=install_weak_deps=False --setopt=tsflags=nodocs install \
25 firewalld-filesystem hostname ovn${OVN_SERIES}-${OVN_VERSION}.el9s procps-ng
26dnf -y clean all
27rm -rf /var/cache/dnf
28EOF
29ARG OVN_COMPONENT
30RUN <<EOF sh -xe
31dnf -y --setopt=install_weak_deps=False --setopt=tsflags=nodocs install \
32 ovn${OVN_SERIES}-${OVN_COMPONENT}-${OVN_VERSION}.el9s
33dnf -y clean all
34rm -rf /var/cache/dnf
35EOF
36COPY --from=ovn-kubernetes --link /src/dist/images/ovndb-raft-functions.sh /root/ovndb-raft-functions.sh
37COPY --from=ovn-kubernetes --link /src/dist/images/ovnkube.sh /root/ovnkube.sh
38COPY --from=ovn-kubernetes --link /usr/bin/ovn-kube-util /usr/bin/ovn-kube-util
Yaguang Tangf0498452025-01-17 20:14:29 +080039
40RUN <<EOF bash -xe
41 usermod -u 42424 openvswitch
42 mkdir -p /var/log/ovn /var/lib/ovn /var/run/ovn
43 chown -Rv 42424:42424 /var/log/ovn /var/lib/ovn /var/run/ovn
44EOF