在Docker中运行OpenWrt旁路网关

1. 安装/升级Docker客户端

2. 配置镜像加速器

针对Docker客户端版本大于 1.10.0 的用户

您可以通过修改daemon配置文件/etc/docker/daemon.json来使用加速器

sudo mkdir -p /etc/docker sudo tee /etc/docker/daemon.json <<-'EOF' { "registry-mirrors": ["https://igl8r5nb.mirror.aliyuncs.com"], "dns":["8.8.8.8","8.8.4.4"] } EOF sudo systemctl daemon-reload sudo systemctl restart docker 

sudo ip link set eth0 promisc on

docker network create -d macvlan –subnet=192.168.99.0/24 –gateway=192.168.99.1 -o parent=eth0 openwrt-LAN

docker run –restart always –name openwrt -d –network openwrt-LAN –privileged sulinggg/openwrt:latest /sbin/init

config interface ‘lan’
option type ‘bridge’
option ifname ‘eth0’
option proto ‘static’
option ipaddr ‘192.168.99.100’
option netmask ‘255.255.255.0’

/etc/init.d/network restart

原文链接:https://www.jianshu.com/p/17b0b26fca8d

© 版权声明
THE END
喜欢就支持一下吧
点赞9 分享