Compare commits
4 Commits
17c3977873
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f0d00fad0d | ||
|
|
e2cac9e288 | ||
|
|
ea8cd89de9 | ||
|
|
2b03aad9bc |
27
README.md
27
README.md
@@ -91,13 +91,28 @@ bind-mount `/etc/vpp/bootstrap.vpp`.
|
|||||||
|
|
||||||
### Building
|
### 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
|
```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 -t $IMG docker/
|
docker buildx build --push --platform linux/arm64,linux/amd64 \
|
||||||
docker image tag $IMG $IMG:$TAG
|
--tag $IMG:$TAG -f docker/Dockerfile docker/
|
||||||
docker push $IMG
|
|
||||||
docker push $IMG:$TAG
|
TAG=v25.10-release
|
||||||
|
docker buildx build --push --build-arg REPO=2510 --platform linux/arm64,linux/amd64 \
|
||||||
|
--tag $IMG:$TAG -f docker/Dockerfile docker/
|
||||||
```
|
```
|
||||||
|
|
||||||
### Testing standalone container
|
### Testing standalone container
|
||||||
@@ -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,
|
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).
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ ARG VPP_INSTALL_SKIP_SYSCTL=true
|
|||||||
ARG REPO=release
|
ARG REPO=release
|
||||||
EXPOSE 22/tcp
|
EXPOSE 22/tcp
|
||||||
RUN apt-get update && apt-get -y install curl procps tcpdump iproute2 iptables \
|
RUN apt-get update && apt-get -y install curl procps tcpdump iproute2 iptables \
|
||||||
iputils-ping net-tools git python3 python3-pip vim-tiny openssh-server bird2 \
|
iputils-ping net-tools git python3 python3-pip vim-tiny openssh-server \
|
||||||
mtr-tiny traceroute && apt-get clean
|
mtr-tiny traceroute && apt-get clean
|
||||||
|
|
||||||
# Install VPP
|
# Install VPP
|
||||||
@@ -19,10 +19,16 @@ RUN pip install --break-system-packages build netaddr yamale argparse pyyaml ipa
|
|||||||
|
|
||||||
# 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 noble 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
|
||||||
|
|
||||||
|
# Install Bird2
|
||||||
|
RUN curl -s -o /usr/share/keyrings/cznic-labs-pkg.gpg https://pkg.labs.nic.cz/gpg && \
|
||||||
|
echo "deb [signed-by=/usr/share/keyrings/cznic-labs-pkg.gpg] https://pkg.labs.nic.cz/bird2 noble main" \
|
||||||
|
> /etc/apt/sources.list.d/cznic-labs-bird2.list && \
|
||||||
|
apt -y update && apt -y install bird2 && apt clean
|
||||||
|
|
||||||
# Config files
|
# Config files
|
||||||
COPY files/etc/ /etc/
|
COPY files/etc/ /etc/
|
||||||
COPY files/init-container.sh /sbin/
|
COPY files/init-container.sh /sbin/
|
||||||
|
|||||||
Reference in New Issue
Block a user