Compare commits

...

3 Commits

2 changed files with 12 additions and 18 deletions

View File

@ -94,7 +94,7 @@ bind-mount `/etc/vpp/bootstrap.vpp`.
```bash ```bash
IMG=git.ipng.ch/ipng/vpp-containerlab IMG=git.ipng.ch/ipng/vpp-containerlab
TAG=latest TAG=latest
docker build --no-cache --build-arg REPO=release -f docker/Dockerfile.bookworm -t $IMG docker/ docker build --no-cache --build-arg REPO=release -f docker/Dockerfile -t $IMG docker/
docker image tag $IMG $IMG:$TAG docker image tag $IMG $IMG:$TAG
docker push $IMG docker push $IMG
docker push $IMG:$TAG docker push $IMG:$TAG
@ -110,7 +110,7 @@ docker run --cap-add=NET_ADMIN --cap-add=SYS_NICE --cap-add=SYS_PTRACE \
--device=/dev/net/tun:/dev/net/tun \ --device=/dev/net/tun:/dev/net/tun \
--device=/dev/vhost-net:/dev/vhost-net \ --device=/dev/vhost-net:/dev/vhost-net \
--privileged --name clab-pim \ --privileged --name clab-pim \
docker.io/pimvanpelt/vpp-containerlab:latest git.ipng.ch/ipng/vpp-containerlab:latest
docker network connect clab-network clab-pim docker network connect clab-network clab-pim
``` ```
@ -172,7 +172,3 @@ Containerlab will attach these `veth` pairs to the container, and replace our Do
that waits for all of these interfaces to be added (typically called `if-wait.sh`). In our own CMD, that waits for all of these interfaces to be added (typically called `if-wait.sh`). In our own CMD,
we then generate a config file called `/etc/vpp/clab.vpp` which contains the necessary VPP commands we then generate a config file called `/etc/vpp/clab.vpp` which contains the necessary VPP commands
to take control over these `veth` pairs. to take control over these `veth` pairs.
In addition, you can add more commands that'll execute on startup by copying in
`/etc/vpp/manual-pre.vpp` (to be executed _before_ the containerlab stuff) or
`/etc/vpp/manual-post.vpp` (to be executed _after_ the containerlab stuff).

View File

@ -1,4 +1,4 @@
FROM debian:bookworm FROM ubuntu:noble
ARG DEBIAN_FRONTEND=noninteractive ARG DEBIAN_FRONTEND=noninteractive
ARG VPP_INSTALL_SKIP_SYSCTL=true ARG VPP_INSTALL_SKIP_SYSCTL=true
ARG REPO=release ARG REPO=release
@ -8,25 +8,23 @@ RUN apt-get update && apt-get -y install curl procps tcpdump iproute2 iptables \
mtr-tiny traceroute && apt-get clean mtr-tiny traceroute && apt-get clean
# Install VPP # Install VPP
RUN mkdir -p /var/log/vpp /root/.ssh/ RUN mkdir -p /var/log/vpp /root/.ssh/ && \
RUN curl -s https://packagecloud.io/install/repositories/fdio/${REPO}/script.deb.sh | bash curl -s https://packagecloud.io/install/repositories/fdio/${REPO}/script.deb.sh | bash && \
RUN apt-get update && apt-get -y install vpp vpp-plugin-core && apt-get clean apt-get -y install vpp vpp-plugin-core && apt-get clean
# Build vppcfg # Build vppcfg
RUN pip install --break-system-packages build netaddr yamale argparse pyyaml ipaddress RUN pip install --break-system-packages build netaddr yamale argparse pyyaml ipaddress && \
RUN git clone https://git.ipng.ch/ipng/vppcfg.git && cd vppcfg && python3 -m build && \ git clone https://git.ipng.ch/ipng/vppcfg.git && cd vppcfg && python3 -m build && \
pip install --break-system-packages dist/vppcfg-*-py3-none-any.whl pip install --break-system-packages dist/vppcfg-*-py3-none-any.whl
# Install FRR # Install FRR
RUN curl -s -o /usr/share/keyrings/frrouting.gpg https://deb.frrouting.org/frr/keys.gpg && \ RUN curl -s -o /usr/share/keyrings/frrouting.gpg https://deb.frrouting.org/frr/keys.gpg && \
echo deb '[signed-by=/usr/share/keyrings/frrouting.gpg]' https://deb.frrouting.org/frr bookworm frr-stable \ echo deb '[signed-by=/usr/share/keyrings/frrouting.gpg]' https://deb.frrouting.org/frr bookworm frr-stable \
> /etc/apt/sources.list.d/frr.list && \ > /etc/apt/sources.list.d/frr.list && \
apt -y update && apt -y install frr frr-pythontools && apt clean apt -y update && apt -y install frr frr-pythontools && apt clean
# Config files # Config files
COPY files/etc/vpp/* /etc/vpp/ COPY files/etc/ /etc/
COPY files/etc/bird/* /etc/bird/
COPY files/etc/frr/* /etc/frr/
COPY files/init-container.sh /sbin/ COPY files/init-container.sh /sbin/
RUN chmod 755 /sbin/init-container.sh RUN chmod 755 /sbin/init-container.sh
CMD ["/sbin/init-container.sh"] CMD ["/sbin/init-container.sh"]