Skip to content

update the docs for using host-network - #6124

Merged
gbarr01 merged 3 commits into
docker:masterfrom
rdxmb:patch-3
Apr 11, 2018
Merged

gbarr01 merged 3 commits into
docker:masterfrom
rdxmb:patch-3

Conversation

@rdxmb

@rdxmb rdxmb commented Mar 1, 2018 •

Copy link
Copy Markdown
Contributor

with syntax before, there is
WARN[0000] network hostnet: network.external.name is deprecated in favor of network.name

tested with docker-compose-file-version 3.5
Server Version: 17.12.0-ce

in swarm mode

Proposed changes

Unreleased project version (optional)

Related issues (optional)

with syntax before, there is
WARN[0000] network hostnet: network.external.name is deprecated in favor of network.name 

tested with docker-compose-file-version 3.5
Server Version: 17.12.0-ce

in swarm mode
@rdxmb rdxmb changed the title update the docs for using host-network DO-NOT-MERGE update the docs for using host-network Mar 1, 2018
@rdxmb

rdxmb commented Mar 1, 2018

Copy link
Copy Markdown
Contributor Author

Hm, the warning disappears, but without using 'external' the swarm does create a network named
<STACK>_host

which is overlay. So what about the deprecation?

@gbarr01

gbarr01 commented Mar 1, 2018

Copy link
Copy Markdown
Contributor

Hi, @rdxmb ... let's see if I understand you:

  • You are referring to this page/section: https://docs.docker.com/compose/compose-file/#host-or-none
  • You're in swarm mode, using Compose, and you want to use the host networking stack. But it's failing.
  • You think that the use of external in this section may be wrong because of the deprecation note down the page.
networks:
  hostnet:
    external:
      name: host

@shin- are the Compose examples under "HOST OR NONE" accurate for v3.5? For reference: #4593 / #4959

@shin-

shin- commented Mar 1, 2018

Copy link
Copy Markdown
Contributor

The new recommend syntax would be:

networks:
  hostnet:
    external: true
    name: host

@rdxmb

rdxmb commented Mar 2, 2018

Copy link
Copy Markdown
Contributor Author

@gbarr01

You are referring to this page/section: https://docs.docker.com/compose/compose-file/#host-or-none
exactly.

You're in swarm mode, using Compose, and you want to use the host networking stack. But it's failing. You think that the use of external in this section may be wrong because of the deprecation note down the page.

Not exactly. It's not failing, its just a deprecation warning:
WARN[0000] network hostnet: network.external.name is deprecated in favor of network.name

networks:
hostnet:
external:
name: host

@shin- it seems to work. Thanks.

https://docs.docker.com/compose/compose-file/#network-configuration-reference

@rdxmb

rdxmb commented Mar 2, 2018

Copy link
Copy Markdown
Contributor Author

PR changed.

@gbarr01 gbarr01 added the area/networking Relates to anything around networking label Mar 2, 2018
@gbarr01
gbarr01 merged commit 246e8e2 into docker:master Apr 11, 2018
@gbarr01 gbarr01 changed the title DO-NOT-MERGE update the docs for using host-network update the docs for using host-network Apr 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/networking Relates to anything around networking

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants