我希望docker-compose
使用--net = "host"
在--net = "host"
中运行我的dokcer图像,因为我的码头运行network_mode: "host"
工作正常。
但我想用docker-compose做这件事。我还在docker-compose.yml
文件中添加了docker-compose.yml
。但没机会。这是我的version: '2'
services:
campaign-app-avano-mci:
image: imagename
ports:
- "4558:4558"
network_mode: "host"
volumes:
- /apps/dockers/campaign-app-avano-mci/:/logs
environment:
- SDP_MONGO_DATABASE="campaign-app-avano-mci"
- SDP_SDK_PORT="4558"
- SDP_PLATFORM_URL="host-platform:9600/aban-platform"
文件:
swift
任何建议?
答案 0 :(得分:1)
问题:
services:
campaign-app-avano-mci:
image: imagefile
network_mode: "host"
ports:
- 4558:4558
volumes:
- /apps/dockers/campaign-app-avano-mci/:/logs
environment:
- SDP_MONGO_DATABASE=campaign-app-avano-mci
- SDP_SDK_PORT=4558
- SDP_PLATFORM_URL=host-platform:9600/aban-platform