blob: 961d6116af6c2b533c234fc95f84153ea7f894a7 [file] [log] [blame]
Mohammed Naserf1ac3f82025-01-18 15:49:44 -05001# SPDX-FileCopyrightText: © 2025 VEXXHOST, Inc.
2# SPDX-License-Identifier: GPL-3.0-or-later
3# Atmosphere-Rebuild-Time: 2024-06-26T17:38:39Z
Mohammed Naserda994232024-04-13 12:34:01 -04004
Mohammed Naserf1ac3f82025-01-18 15:49:44 -05005FROM golang AS ovn-kubernetes
Rico Lin1b101192024-04-16 05:57:09 +08006ARG OVN_KUBERNETES_REF=5359e7d7f872058b6e5bf884c9f19d1922451f29
Mohammed Naserda994232024-04-13 12:34:01 -04007ADD https://github.com/ovn-org/ovn-kubernetes.git#${OVN_KUBERNETES_REF} /src
8COPY patches/ovn-kubernetes /patches/ovn-kubernetes
9RUN git -C /src apply --verbose /patches/ovn-kubernetes/*
10RUN <<EOF bash -xe
11cd /src/go-controller
12go build -o /usr/bin/ovn-kube-util ./cmd/ovn-kube-util
13EOF
14
Mohammed Naserf1ac3f82025-01-18 15:49:44 -050015FROM openvswitch
Yaguang Tang6db2e112025-01-17 20:14:29 +080016ENV OVS_USER_ID=42424
vexxhost-botf77e4ba2024-06-21 14:24:28 +020017ARG TARGETPLATFORM
18ADD --chmod=755 https://dl.k8s.io/release/v1.29.3/bin/${TARGETPLATFORM}/kubectl /usr/local/bin/kubectl
Mohammed Naser2433adc2024-06-26 15:34:45 -040019ARG OVN_SERIES=24.03
Yaguang Tang678870c2025-02-01 16:50:14 +080020ARG OVN_VERSION=${OVN_SERIES}.2-34
Mohammed Naserda994232024-04-13 12:34:01 -040021RUN <<EOF sh -xe
22dnf -y --setopt=install_weak_deps=False --setopt=tsflags=nodocs install \
23 firewalld-filesystem hostname ovn${OVN_SERIES}-${OVN_VERSION}.el9s procps-ng
24dnf -y clean all
25rm -rf /var/cache/dnf
26EOF
27ARG OVN_COMPONENT
28RUN <<EOF sh -xe
29dnf -y --setopt=install_weak_deps=False --setopt=tsflags=nodocs install \
30 ovn${OVN_SERIES}-${OVN_COMPONENT}-${OVN_VERSION}.el9s
31dnf -y clean all
32rm -rf /var/cache/dnf
33EOF
34COPY --from=ovn-kubernetes --link /src/dist/images/ovndb-raft-functions.sh /root/ovndb-raft-functions.sh
35COPY --from=ovn-kubernetes --link /src/dist/images/ovnkube.sh /root/ovnkube.sh
36COPY --from=ovn-kubernetes --link /usr/bin/ovn-kube-util /usr/bin/ovn-kube-util
Mohammed Naser35cb5892025-02-16 13:18:14 -050037COPY --from=ovsinit /usr/local/bin/ovsinit /usr/local/bin/ovsinit
Yaguang Tang6db2e112025-01-17 20:14:29 +080038RUN <<EOF bash -xe
39 usermod -u 42424 openvswitch
40 mkdir -p /var/log/ovn /var/lib/ovn /var/run/ovn
41 chown -Rv 42424:42424 /var/log/ovn /var/lib/ovn /var/run/ovn
42EOF