ENGDOCS-1968 (#19276)

* ENGDOCS-1968

* add link
This commit is contained in:
Allie Sadler 2024-02-01 12:32:59 +00:00 committed by GitHub
parent a5fe1766f5
commit 21f9086699
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 38 deletions

View File

@ -70,46 +70,10 @@ driver is not available on the platform.
```yml ```yml
networks: networks:
db-data: db-data:
driver: overlay driver: bridge
``` ```
Compose supports the following drivers: For more information on drivers and available options, see [Network drivers](../../network/drivers/_index.md).
`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