3 Star 0 Fork 0

mirrors_zephyrproject-rtos/net-tools

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
README.docker 1.56 KB
一键复制 编辑 原始数据 按行查看 历史
# Testing with net-tools and Docker
* Create Docker image
cd docker/
docker build -t net-tools .
* Setup network interfaces, IP addresses and routes
sudo ./net-setup.sh --config docker.conf start
* Run Docker image
Set the docker internal network name to the value $DOCKER_USER_INTERFACE
in docker.config above, default is 'net-tools0'. The bridge network that
docker creates will be printed on standard out, it's bridge interface
name will be br-XXXXXXXXXXXX. Check that the IPv4 and IPv6 addresses
given on the docker command line match the subnets in 'docker.conf'.
Interactively:
docker run --hostname=zephyr --name=net-tools \
--ip=192.0.2.2 --ip6=2001:db8::2 \
--rm -it --network=net-tools0 net-tools sh
exit with Ctrl-p ctrl-q to execute tests from the command line
Non-interactively
docker run --hostname=zephyr --name=net-tools \
--ip=192.0.2.2 --ip6=2001:db8::2 \
--rm -dt --network=net-tools0 net-tools sh
* Run Qemu / native-posix image
rm -rf build && mkdir build
cmake -GNinja -DBOARD=native_posix -B build
or
cmake -GNinja -DBOARD=qemu_x86 -DOVERLAY_CONFIG=overlay-e1000.conf \
-B build
ninja -C build run
* Execute tests like echo-client
docker container exec net-tools /net-tools/echo-client 2001:db8::1
docker container exec net-tools /net-tools/echo-client -t 2001:db8::1
docker container exec net-tools /net-tools/echo-client 192.0.2.1
docker container exec net-tools /net-tools/echo-client -t 192.0.2.1
* Remove the network setup:
sudo ./net-setup.sh --config docker.conf stop
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/mirrors_zephyrproject-rtos/net-tools.git
git@gitee.com:mirrors_zephyrproject-rtos/net-tools.git
mirrors_zephyrproject-rtos
net-tools
net-tools
master

搜索帮助