Skip to content

Commit

Permalink
remove host or none section wich is wrong
Browse files Browse the repository at this point in the history
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
  • Loading branch information
ndeloof committed May 30, 2024
1 parent 20ebf93 commit 5c18e32
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 76 deletions.
38 changes: 0 additions & 38 deletions 06-networks.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,44 +69,6 @@ networks:
driver: overlay
```

Default and available values are platform specific. Compose supports the following drivers:
`none` and `host`

- `host`: Use the host's networking stack.
- `none`: Turn off networking.

#### host or none

The syntax for using built-in networks such as `host` and `none` is different, as such networks implicitly exist outside
the scope of Compose. To use them, you must define an external network with the name `host` or `none` and
an alias that Compose can use (`hostnet` and `nonet` in the following example), then grant the service
access to that network using its alias.

```yml
services:
web:
networks:
hostnet: {}
networks:
hostnet:
external: true
name: host
```

```yml
services:
web:
...
networks:
nonet: {}
networks:
nonet:
external: true
name: none
```

### driver_opts

`driver_opts` specifies a list of options as key-value pairs to pass to the driver. These options are
Expand Down
38 changes: 0 additions & 38 deletions spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -2126,44 +2126,6 @@ networks:
driver: overlay
```

Default and available values are platform specific. Compose supports the following drivers:
`none` and `host`

- `host`: Use the host's networking stack.
- `none`: Turn off networking.

#### host or none

The syntax for using built-in networks such as `host` and `none` is different, as such networks implicitly exist outside
the scope of Compose. To use them, you must define an external network with the name `host` or `none` and
an alias that Compose can use (`hostnet` and `nonet` in the following example), then grant the service
access to that network using its alias.

```yml
services:
web:
networks:
hostnet: {}
networks:
hostnet:
external: true
name: host
```

```yml
services:
web:
...
networks:
nonet: {}
networks:
nonet:
external: true
name: none
```

### driver_opts

`driver_opts` specifies a list of options as key-value pairs to pass to the driver. These options are
Expand Down

0 comments on commit 5c18e32

Please sign in to comment.