0
点赞
收藏
分享

微信扫一扫

user specified IP address is supported only when connecting to networks with user configured subnets

杰森wang 2022-02-21 阅读 102

容器启动报错:
user specified IP address is supported only when connecting to networks with user configured subnets

原因:
docker容器要指定IP,网络必须通过subnets创建

解决办法:

  • 删除对应的网络,比如我们的网络是 my_net:docker network rm my_net

  • Docker解决办法:docker network create --driver bridge --subnet 172.40.1.0/24 --gateway 172.40.1.1 my_net

  • docker-compose解决办法:
    在这里插入图片描述

举报

相关推荐

0 条评论