Mohammed Naser | da99423 | 2024-04-13 12:34:01 -0400 | [diff] [blame] | 1 | # Copyright (c) 2024 VEXXHOST, Inc. |
| 2 | # |
| 3 | # Licensed under the Apache License, Version 2.0 (the "License"); you may |
| 4 | # not use this file except in compliance with the License. You may obtain |
| 5 | # a copy of the License at |
| 6 | # |
| 7 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | # |
| 9 | # Unless required by applicable law or agreed to in writing, software |
| 10 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 11 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| 12 | # License for the specific language governing permissions and limitations |
| 13 | # under the License. |
| 14 | |
Mohammed Naser | d30f18d | 2024-04-17 01:20:43 -0400 | [diff] [blame] | 15 | ARG RELEASE |
| 16 | |
Mohammed Naser | da99423 | 2024-04-13 12:34:01 -0400 | [diff] [blame] | 17 | FROM golang:1.20 AS ovn-kubernetes |
Rico Lin | 1b10119 | 2024-04-16 05:57:09 +0800 | [diff] [blame] | 18 | ARG OVN_KUBERNETES_REF=5359e7d7f872058b6e5bf884c9f19d1922451f29 |
Mohammed Naser | da99423 | 2024-04-13 12:34:01 -0400 | [diff] [blame] | 19 | ADD https://github.com/ovn-org/ovn-kubernetes.git#${OVN_KUBERNETES_REF} /src |
| 20 | COPY patches/ovn-kubernetes /patches/ovn-kubernetes |
| 21 | RUN git -C /src apply --verbose /patches/ovn-kubernetes/* |
| 22 | RUN <<EOF bash -xe |
| 23 | cd /src/go-controller |
| 24 | go build -o /usr/bin/ovn-kube-util ./cmd/ovn-kube-util |
| 25 | EOF |
| 26 | |
Mohammed Naser | d30f18d | 2024-04-17 01:20:43 -0400 | [diff] [blame] | 27 | FROM registry.atmosphere.dev/library/openvswitch:${RELEASE} |
Mohammed Naser | da99423 | 2024-04-13 12:34:01 -0400 | [diff] [blame] | 28 | ADD --chmod=755 https://dl.k8s.io/release/v1.29.3/bin/linux/amd64/kubectl /usr/local/bin/kubectl |
Mohammed Naser | 65cda13 | 2024-05-02 14:34:08 -0400 | [diff] [blame^] | 29 | ARG OVN_SERIES=23.09 |
| 30 | ARG OVN_VERSION=${OVN_SERIES}.0-136 |
Mohammed Naser | da99423 | 2024-04-13 12:34:01 -0400 | [diff] [blame] | 31 | RUN <<EOF sh -xe |
| 32 | dnf -y --setopt=install_weak_deps=False --setopt=tsflags=nodocs install \ |
| 33 | firewalld-filesystem hostname ovn${OVN_SERIES}-${OVN_VERSION}.el9s procps-ng |
| 34 | dnf -y clean all |
| 35 | rm -rf /var/cache/dnf |
| 36 | EOF |
| 37 | ARG OVN_COMPONENT |
| 38 | RUN <<EOF sh -xe |
| 39 | dnf -y --setopt=install_weak_deps=False --setopt=tsflags=nodocs install \ |
| 40 | ovn${OVN_SERIES}-${OVN_COMPONENT}-${OVN_VERSION}.el9s |
| 41 | dnf -y clean all |
| 42 | rm -rf /var/cache/dnf |
| 43 | EOF |
| 44 | COPY --from=ovn-kubernetes --link /src/dist/images/ovndb-raft-functions.sh /root/ovndb-raft-functions.sh |
| 45 | COPY --from=ovn-kubernetes --link /src/dist/images/ovnkube.sh /root/ovnkube.sh |
| 46 | COPY --from=ovn-kubernetes --link /usr/bin/ovn-kube-util /usr/bin/ovn-kube-util |