Update the build to multi-arch packages with buildx and qemu on arm64,amd64
This commit is contained in:
23
README.md
23
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.02-release
|
||||||
|
docker buildx build --push --platform linux/arm64,linux/amd64 \
|
||||||
|
--tag $IMG:$TAG -f docker/Dockerfile docker/
|
||||||
```
|
```
|
||||||
|
|
||||||
### Testing standalone container
|
### Testing standalone container
|
||||||
|
Reference in New Issue
Block a user