blob: 43201d19e5535be310614a0f61c72356072c4a2e [file] [log] [blame]
Mohammed Naserda994232024-04-13 12:34:01 -04001# 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 Naserd30f18d2024-04-17 01:20:43 -040015ARG RELEASE
16
Mohammed Naserda994232024-04-13 12:34:01 -040017FROM golang:1.20 AS ovn-kubernetes
Rico Lin1b101192024-04-16 05:57:09 +080018ARG OVN_KUBERNETES_REF=5359e7d7f872058b6e5bf884c9f19d1922451f29
Mohammed Naserda994232024-04-13 12:34:01 -040019ADD https://github.com/ovn-org/ovn-kubernetes.git#${OVN_KUBERNETES_REF} /src
20COPY patches/ovn-kubernetes /patches/ovn-kubernetes
21RUN git -C /src apply --verbose /patches/ovn-kubernetes/*
22RUN <<EOF bash -xe
23cd /src/go-controller
24go build -o /usr/bin/ovn-kube-util ./cmd/ovn-kube-util
25EOF
26
Mohammed Naserd30f18d2024-04-17 01:20:43 -040027FROM registry.atmosphere.dev/library/openvswitch:${RELEASE}
Mohammed Naserda994232024-04-13 12:34:01 -040028ADD --chmod=755 https://dl.k8s.io/release/v1.29.3/bin/linux/amd64/kubectl /usr/local/bin/kubectl
29ARG OVN_SERIES=23.03
30ARG OVN_VERSION=${OVN_SERIES}.0-69
31RUN <<EOF sh -xe
32dnf -y --setopt=install_weak_deps=False --setopt=tsflags=nodocs install \
33 firewalld-filesystem hostname ovn${OVN_SERIES}-${OVN_VERSION}.el9s procps-ng
34dnf -y clean all
35rm -rf /var/cache/dnf
36EOF
37ARG OVN_COMPONENT
38RUN <<EOF sh -xe
39dnf -y --setopt=install_weak_deps=False --setopt=tsflags=nodocs install \
40 ovn${OVN_SERIES}-${OVN_COMPONENT}-${OVN_VERSION}.el9s
41dnf -y clean all
42rm -rf /var/cache/dnf
43EOF
44COPY --from=ovn-kubernetes --link /src/dist/images/ovndb-raft-functions.sh /root/ovndb-raft-functions.sh
45COPY --from=ovn-kubernetes --link /src/dist/images/ovnkube.sh /root/ovnkube.sh
46COPY --from=ovn-kubernetes --link /usr/bin/ovn-kube-util /usr/bin/ovn-kube-util