engine: fix ipv6 example for Compose (#18119)

See 796804a634/06-networks.md (L168-L196)

(Note: there's a typo there too, which is being fixed as
compose-spec/compose-spec#417. The indentation is wrong, but the
description of the fields/hierarchy is correct.)

Signed-off-by: Milas Bowman <milas.bowman@docker.com>
This commit is contained in:
Milas Bowman 2023-09-07 08:42:17 -04:00 committed by GitHub
parent 9691e6d99e
commit e0b12724a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 5 deletions

View File

@ -54,10 +54,12 @@ The following steps show you how to create a Docker network that uses IPv6.
- Using a Docker Compose file:
```yaml
networks:
ip6net:
enable_ipv6: true
subnet: 2001:0DB8::/112
networks:
ip6net:
enable_ipv6: true
ipam:
config:
- subnet: 2001:0DB8::/112
```
You can now run containers that attach to the `ip6net` network.
@ -214,4 +216,4 @@ subnet supports 65 536 IPv6 addresses.
## Next steps
- [Networking overview](../../network/index.md)
- [Networking overview](../../network/index.md)