Add Linux CP: create 'dataplane' network namespace, move to init-container.sh to do the plumbing

This commit is contained in:
Pim van Pelt
2025-05-03 13:45:51 +02:00
parent 234ff1d1d3
commit e71451f1c5
3 changed files with 36 additions and 10 deletions

View File

@ -2,15 +2,21 @@ FROM debian:bookworm
ARG DEBIAN_FRONTEND=noninteractive
ARG VPP_INSTALL_SKIP_SYSCTL=true
ARG REPO=release
RUN apt-get update
RUN apt-get -y install curl procps tcpdump iproute2 iptables binutils \
bridge-utils iputils-ping netcat-traditional net-tools nmap \
python3 python3-dev python3-pip
RUN apt-get update && apt-get -y install curl procps tcpdump iproute2 iptables \
iputils-ping net-tools git python3 python3-pip && apt-get clean
# Install VPP
RUN mkdir -p /var/log/vpp
RUN curl -s https://packagecloud.io/install/repositories/fdio/${REPO}/script.deb.sh | bash
RUN apt-get update
RUN apt-get -y install vpp vpp-plugin-core
RUN apt-get -y clean
COPY files/startup.conf /etc/vpp/startup.conf
COPY files/*.vpp /etc/vpp/
CMD ["/usr/bin/vpp","-c","/etc/vpp/startup.conf"]
RUN apt-get update && apt-get -y install vpp vpp-plugin-core && apt-get clean
# Build vppcfg
RUN pip install --break-system-packages build netaddr yamale argparse pyyaml ipaddress
RUN git clone https://github.com/pimvanpelt/vppcfg.git && cd vppcfg && python3 -m build && \
pip install --break-system-packages dist/vppcfg-*-py3-none-any.whl
# Config files
COPY files/startup.conf files/*.vpp /etc/vpp/
COPY files/init-container.sh /sbin/
RUN chmod 755 /sbin/init-container.sh
CMD ["/sbin/init-container.sh"]