2
我正在嘗試使用Docker Compose運行Consul和Registrator。通過手,我這樣做:在Docker Compose中運行參數
docker run --net=host consul
docker run --net=host -v /var/run/docker.sock:/tmp/docker.sock gliderlabs/registrator consul://localhost:8500
我有這個搬運工,compose.yml,迄今:
version: '2'
services:
consul:
network_mode: 'host'
image: consul
registrator:
network_mode: 'host'
volumes:
- /var/run/docker.sock:/tmp/docker.sock
depends_on:
- consul
image: gliderlabs/registrator
但是,我怎麼能傳遞參數 「領事://本地主機:8500」註冊人在docker-compose.yml中註冊?
如果你運行'泊塢窗,撰寫運行registrator領事會發生什麼: // localhost:8500'? – Railslide