forked from openshift/ovn-kubernetes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.base
46 lines (37 loc) · 1.66 KB
/
Dockerfile.base
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#
# This is the OpenShift ovn overlay network image.
# it provides an overlay network using ovs/ovn/ovn-kube
#
# The standard name for this image is ovn-kubernetes-base
# build base image shared by both OpenShift and MicroShift
FROM registry.ci.openshift.org/ocp/4.14:base-rhel9
# install selinux-policy first to avoid a race
RUN dnf install -y --nodocs \
selinux-policy procps-ng && \
dnf clean all
ARG ovsver=3.1.0-32.el9fdp
ARG ovnver=23.06.0-51.el9fdp
RUN INSTALL_PKGS="iptables" && \
ovsver_short=$(echo "$ovsver" | cut -d'.' -f1,2) && \
ovnver_short=$(echo "$ovnver" | cut -d'.' -f1,2) && \
dnf install -y --nodocs $INSTALL_PKGS && \
dnf install -y --nodocs "openvswitch$ovsver_short = $ovsver" "python3-openvswitch$ovsver_short = $ovsver" && \
dnf install -y --nodocs "ovn$ovnver_short = $ovnver" "ovn$ovnver_short-central = $ovnver" "ovn$ovnver_short-host = $ovnver" && \
dnf clean all && rm -rf /var/cache/*
RUN ovsver_short=$(echo "$ovsver" | cut -d'.' -f1,2) && \
ovnver_short=$(echo "$ovnver" | cut -d'.' -f1,2) && \
sed 's/%/"/g' <<<"%openvswitch$ovsver_short-devel = $ovsver% %openvswitch$ovsver_short-ipsec = $ovsver% %ovn$ovnver_short-vtep = $ovnver%" > /more-pkgs
RUN mkdir -p /var/run/openvswitch && \
mkdir -p /var/run/ovn && \
mkdir -p /etc/cni/net.d && \
mkdir -p /opt/cni/bin && \
mkdir -p /usr/libexec/cni/ && \
mkdir -p /root/windows/
# copy git commit number into image
COPY .git/HEAD /root/.git/HEAD
COPY .git/refs/heads/ /root/.git/refs/heads/
# ovnkube.sh is the entry point. This script examines environment
# variables to direct operation and configure ovn
COPY dist/images/ovnkube.sh /root/
WORKDIR /root
ENTRYPOINT /root/ovnkube.sh