2
我創建了一個外部覆蓋網絡:搬運工,撰寫無法連接到外部網絡
docker network create --driver overlay --subnet=10.0.9.0/24 mynetwork
網絡創建成功:
$ docker network ls
NETWORK ID NAME DRIVER SCOPE
37295f249f91 bridge bridge local
c2ec03c99888 docker_gwbridge bridge local
33dd13c9686d host host local
27goixjy0jys ingress overlay swarm
75508732fab2 none null local
ef6fti3kq6w4 mynetwork overlay swarm
當我嘗試把集裝箱進去在我docker-compose.yml
,服務的創建失敗
$ docker-compose up
Creating service-lb
ERROR: for service-lb network mynetwork not found
ERROR: Encountered errors while bringing up the project.
我docker-compose.yml
外觀像這樣:
version: "2"
services:
service-lb:
image: myreg:5000/myorg/service-lb:latest
ports:
- "0.0.0.0:10080:80"
dns_search:
- .
networks:
- mynetwork
networks:
mynetwork:
external: true
是docker-compose
無法在羣的範圍,以應對覆蓋的網絡?
Versions:
docker-compose v1.8.0-rc2
docker 1.12.0-rc5