在我的碼頭工人,撰寫:如何在鏈接到容器時使用主機網絡?
laravel:
image: trackware
links:
- postgis:postgis
ports:
- "80:80"
- "3306:3306"
- "443:443"
- "220:22"
- "8000:8000"
net: "host"
restart: always
volumes:
- C:/H/repositories/pubnub:/share
container_name: laravel
postgis:
image: mdillon/postgis
env_file: .postgis_env
ports:
- "9090:9000"
- "54320:5432"
container_name: postgis
,如果我跑docker-compose up -d
我得到這個錯誤:
Conflicting options: host type networking can't be used with links. This would result in undefined behavior
所以,我會怎麼用net: "host"
同時鏈接到PostGIS的容器? laravel容器需要運行pubnub客戶端,這將需要高性能網絡來處理實時消息,並且它還需要鏈接到postgis
容器才能訪問db。
那麼,有什麼建議嗎?我正在使用docker 1.10.2
是否有任何需要考慮的PubNub相關?看起來不像有,但我想問問。 –
不,這裏沒有任何關係到PubNub – simo
你可能想從這個問題中刪除laravel標籤,因爲它似乎是一個普通的碼頭問題 – BSchlinker