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 | |
| 15 | FROM golang:1.20 AS ovn-kubernetes |
| 16 | ARG OVN_KUBERNETES_REF=cbff639b83af00e4887b540fc06b880108662780 |
| 17 | ADD https://github.com/ovn-org/ovn-kubernetes.git#${OVN_KUBERNETES_REF} /src |
| 18 | COPY patches/ovn-kubernetes /patches/ovn-kubernetes |
| 19 | RUN git -C /src apply --verbose /patches/ovn-kubernetes/* |
| 20 | RUN <<EOF bash -xe |
| 21 | cd /src/go-controller |
| 22 | go build -o /usr/bin/ovn-kube-util ./cmd/ovn-kube-util |
| 23 | EOF |
| 24 | |
| 25 | FROM registry.atmosphere.dev/library/openvswitch:main |
| 26 | ADD --chmod=755 https://dl.k8s.io/release/v1.29.3/bin/linux/amd64/kubectl /usr/local/bin/kubectl |
| 27 | ARG OVN_SERIES=23.03 |
| 28 | ARG OVN_VERSION=${OVN_SERIES}.0-69 |
| 29 | RUN <<EOF sh -xe |
| 30 | dnf -y --setopt=install_weak_deps=False --setopt=tsflags=nodocs install \ |
| 31 | firewalld-filesystem hostname ovn${OVN_SERIES}-${OVN_VERSION}.el9s procps-ng |
| 32 | dnf -y clean all |
| 33 | rm -rf /var/cache/dnf |
| 34 | EOF |
| 35 | ARG OVN_COMPONENT |
| 36 | RUN <<EOF sh -xe |
| 37 | dnf -y --setopt=install_weak_deps=False --setopt=tsflags=nodocs install \ |
| 38 | ovn${OVN_SERIES}-${OVN_COMPONENT}-${OVN_VERSION}.el9s |
| 39 | dnf -y clean all |
| 40 | rm -rf /var/cache/dnf |
| 41 | EOF |
| 42 | COPY --from=ovn-kubernetes --link /src/dist/images/ovndb-raft-functions.sh /root/ovndb-raft-functions.sh |
| 43 | COPY --from=ovn-kubernetes --link /src/dist/images/ovnkube.sh /root/ovnkube.sh |
| 44 | COPY --from=ovn-kubernetes --link /usr/bin/ovn-kube-util /usr/bin/ovn-kube-util |