Trying to build vpp
This commit is contained in:
73
docker/vpp.Dockerfile
Normal file
73
docker/vpp.Dockerfile
Normal file
@@ -0,0 +1,73 @@
|
||||
FROM ubuntu:22.04
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
WORKDIR /src
|
||||
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
ca-certificates \
|
||||
curl \
|
||||
gnupg \
|
||||
lsb-release \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Add FD.io release repo (Jammy / arm64 packages exist for v26.02)
|
||||
RUN set -eux; \
|
||||
mkdir -p /etc/apt/keyrings; \
|
||||
curl -fsSL https://packagecloud.io/fdio/release/gpgkey \
|
||||
| gpg --dearmor -o /etc/apt/keyrings/fdio-release.gpg; \
|
||||
echo "deb [signed-by=/etc/apt/keyrings/fdio-release.gpg] https://packagecloud.io/fdio/release/ubuntu/ jammy main" \
|
||||
> /etc/apt/sources.list.d/fdio-release.list; \
|
||||
apt-get update; \
|
||||
apt-get install -y --no-install-recommends \
|
||||
vpp=26.02-release \
|
||||
vpp-plugin-core=26.02-release \
|
||||
vpp-plugin-dpdk=26.02-release; \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN mkdir -p /etc/vpp /run/vpp
|
||||
|
||||
RUN cat > /etc/vpp/startup.conf <<'EOF'
|
||||
unix {
|
||||
nodaemon
|
||||
cli-listen /run/vpp/cli.sock
|
||||
log /dev/stderr
|
||||
full-coredump
|
||||
}
|
||||
|
||||
api-trace {
|
||||
on
|
||||
}
|
||||
|
||||
cpu {
|
||||
main-core 0
|
||||
}
|
||||
|
||||
plugins {
|
||||
plugin default { disable }
|
||||
plugin dpdk_plugin.so { enable }
|
||||
}
|
||||
|
||||
dpdk {
|
||||
no-pci
|
||||
dev dpaa_bus:fm1-mac9
|
||||
dev dpaa_bus:fm1-mac10
|
||||
}
|
||||
EOF
|
||||
|
||||
RUN cat > /usr/local/bin/docker-entrypoint.sh <<'EOF'
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
|
||||
mkdir -p /run/vpp
|
||||
|
||||
echo "=== device check ==="
|
||||
ls -l /dev/fsl-usdpaa /dev/fsl-usdpaa-irq 2>/dev/null || true
|
||||
echo "=== sysfs check ==="
|
||||
ls -l /sys/class/net 2>/dev/null || true
|
||||
|
||||
exec /usr/bin/vpp -c /etc/vpp/startup.conf "$@"
|
||||
EOF
|
||||
|
||||
RUN chmod +x /usr/local/bin/docker-entrypoint.sh
|
||||
|
||||
ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]
|
||||
Reference in New Issue
Block a user