Compose: Compose V3 supports network=host

Created on 19 Jul 2017  路  9Comments  路  Source: docker/compose

According to issue swarm mode + (--net=host), docker service create --network=host is ready in 17.06.
Now we are waiting for the compose v3 to support network: host. Thanks.

docker-stack

Most helpful comment

You're supposed to use network_mode, which works ok under compose but not with docker stack: "is ignored when deploying a stack in swarm mode with a (version 3) Compose file."

All 9 comments

Before docker 17-06, Network:host is ignored when deploying a stack in swarm mode with a (version 3) Compose file. But after 17-06, the host network is supported in docker service. How can we use network host in compose V3?

Please redirect docker stack related questions or requests to the https://github.com/docker/cli repo :)

I think it should be supported in compose V3 parser.

@shin- why is a question regarding "docker stack" & "compose v3" a docker cli related question? i don't understand that...
@cheyang i also think that the compose v3 parser should support the new "docker service" ability!

@rauschb The docker/cli repo is literally where the code for docker stack lives.

@shin- thx for the info! i haven't known that, learning never stops... :)

@shin- I'm wondering if I run docker-compose with compose V3, can network: host work? I thought it does nothing with docker stack .

You're supposed to use network_mode, which works ok under compose but not with docker stack: "is ignored when deploying a stack in swarm mode with a (version 3) Compose file."

Was this page helpful?
0 / 5 - 0 ratings

Related issues

29e7e280-0d1c-4bba-98fe-f7cd3ca7500a picture 29e7e280-0d1c-4bba-98fe-f7cd3ca7500a  路  3Comments

HackerWilson picture HackerWilson  路  3Comments

CrimsonGlory picture CrimsonGlory  路  3Comments

bergtwvd picture bergtwvd  路  3Comments

bitver picture bitver  路  3Comments