docker: Error response from daemon: user specified IP address is supported only when connecting to networks with user configured subnets.解決


 

創建一個網絡,網絡指定IP運行容器報錯,原因,docker中,只有使用 --subnet創建的網絡才能指定靜態IP

┌──[root@liruilongs.github.io]-[~]
└─$ docker network create load_balancing #創建一個網絡
f9595e36d8a2fffd4e8570ad47439fa2a33864a357431c2abfad35d7d444c0c8
┌──[root@liruilongs.github.io]-[~]
└─$  docker run -itd -p 30000:80  --name=web1 --network=load_balancing --ip 172.18.0.2 httpd
3451c060c88b7d837d51ceab959d2faf805771a1b8e9ea2c186a91e4b492d3d8
docker: Error response from daemon: user specified IP address is supported only when connecting to networks with user configured subnets.

  


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM