`

Docker 为容器添加ip

阅读更多
#查看网卡 找打与外部交互的网卡
ifconfig

#添加IP到eth0网卡上
ifconfig eth0:0 172.16.26.220 netmask 255.255.255.0 up

#查看网卡
ifconfig

#运行容器
docker run -i -t -d -p 172.16.26.220:8090:8080 7c824a2bc3d6 /bin/bash
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics