Compare commits
4 Commits
49b8df9709
...
main
Author | SHA1 | Date | |
---|---|---|---|
ea8cd89de9 | |||
2b03aad9bc | |||
17c3977873 | |||
e5889b22e2 |
29
README.md
29
README.md
@ -91,13 +91,28 @@ bind-mount `/etc/vpp/bootstrap.vpp`.
|
||||
|
||||
### Building
|
||||
|
||||
To build, this container uses Docker's `buildx`, for which on Debian Bookworm it's required to use
|
||||
the upstream (docker.com) packages described [[here](https://docs.docker.com/engine/install/debian/)].
|
||||
To allow the buildx to build for multi-arch, it's also required to install the Qemu `binfmt`
|
||||
emulators, with:
|
||||
|
||||
```bash
|
||||
docker run --privileged --rm tonistiigi/binfmt --install all
|
||||
```
|
||||
|
||||
Then, ongoing builds can be cross-platform and take about 1500 seconds on an AMD64 i7-12700T
|
||||
The buildx invocation will build 'latest' and then tag it with the current VPP package release,
|
||||
which you can get from `vppcfg show version`, like so:
|
||||
|
||||
```bash
|
||||
IMG=git.ipng.ch/ipng/vpp-containerlab
|
||||
TAG=latest
|
||||
docker build --no-cache --build-arg REPO=release -f docker/Dockerfile.bookworm -t $IMG docker/
|
||||
docker image tag $IMG $IMG:$TAG
|
||||
docker push $IMG
|
||||
docker push $IMG:$TAG
|
||||
docker buildx build --push --platform linux/arm64,linux/amd64 \
|
||||
--tag $IMG:$TAG -f docker/Dockerfile docker/
|
||||
|
||||
TAG=v25.02-release
|
||||
docker buildx build --push --platform linux/arm64,linux/amd64 \
|
||||
--tag $IMG:$TAG -f docker/Dockerfile docker/
|
||||
```
|
||||
|
||||
### Testing standalone container
|
||||
@ -110,7 +125,7 @@ docker run --cap-add=NET_ADMIN --cap-add=SYS_NICE --cap-add=SYS_PTRACE \
|
||||
--device=/dev/net/tun:/dev/net/tun \
|
||||
--device=/dev/vhost-net:/dev/vhost-net \
|
||||
--privileged --name clab-pim \
|
||||
docker.io/pimvanpelt/vpp-containerlab:latest
|
||||
git.ipng.ch/ipng/vpp-containerlab:latest
|
||||
docker network connect clab-network clab-pim
|
||||
```
|
||||
|
||||
@ -172,7 +187,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,
|
||||
we then generate a config file called `/etc/vpp/clab.vpp` which contains the necessary VPP commands
|
||||
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).
|
||||
|
@ -1,4 +1,4 @@
|
||||
FROM debian:bookworm
|
||||
FROM ubuntu:noble
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
ARG VPP_INSTALL_SKIP_SYSCTL=true
|
||||
ARG REPO=release
|
||||
@ -8,13 +8,13 @@ RUN apt-get update && apt-get -y install curl procps tcpdump iproute2 iptables \
|
||||
mtr-tiny traceroute && apt-get clean
|
||||
|
||||
# Install VPP
|
||||
RUN mkdir -p /var/log/vpp /root/.ssh/
|
||||
RUN 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
|
||||
RUN mkdir -p /var/log/vpp /root/.ssh/ && \
|
||||
curl -s https://packagecloud.io/install/repositories/fdio/${REPO}/script.deb.sh | bash && \
|
||||
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://git.ipng.ch/ipng/vppcfg.git && cd vppcfg && python3 -m build && \
|
||||
RUN pip install --break-system-packages build netaddr yamale argparse pyyaml ipaddress && \
|
||||
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
|
||||
|
||||
# Install FRR
|
||||
@ -24,9 +24,7 @@ RUN curl -s -o /usr/share/keyrings/frrouting.gpg https://deb.frrouting.org/frr/k
|
||||
apt -y update && apt -y install frr frr-pythontools && apt clean
|
||||
|
||||
# Config files
|
||||
COPY files/etc/vpp/* /etc/vpp/
|
||||
COPY files/etc/bird/* /etc/bird/
|
||||
COPY files/etc/frr/* /etc/frr/
|
||||
COPY files/etc/ /etc/
|
||||
COPY files/init-container.sh /sbin/
|
||||
RUN chmod 755 /sbin/init-container.sh
|
||||
CMD ["/sbin/init-container.sh"]
|
Reference in New Issue
Block a user