Skip to content

Commit

Permalink
Update ipv6 instructions for 3.x Compose files
Browse files Browse the repository at this point in the history
IPv6 instructions on docker/compose#4958, are compatible with Docker Compose 3.x
  • Loading branch information
kaylareopelle authored Jan 24, 2022
1 parent dbd5c0f commit 94a7936
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions compose/compose-file/compose-file-v3.md
Original file line number Diff line number Diff line change
Expand Up @@ -1592,8 +1592,17 @@ The corresponding network configuration in the
[top-level networks section](#network-configuration-reference) must have an
`ipam` block with subnet configurations covering each static address.

> If IPv6 addressing is desired, the [`enable_ipv6`](compose-file-v2.md#enable_ipv6)
> option must be set, and you must use a [version 2.x Compose file](compose-file-v2.md#ipv4_address-ipv6_address).
IPv6 addressing can be accessed in a version 3.x Compose file by editing the `/etc/docker/daemon.json` to contain:
`{"ipv6": true, "fixed-cidr-v6": "2001:db8:1::/64"}`

Then, reload the docker daemon and edit docker-compose.yml to contain the following under the service:
```
sysctls:
- net.ipv6.conf.all.disable_ipv6=0
```

> The [`enable_ipv6`](compose-file-v2.md#enable_ipv6)
> option is only available in a [version 2.x Compose file](compose-file-v2.md#ipv4_address-ipv6_address).
> _IPv6 options do not currently work in swarm mode_.

An example:
Expand Down

0 comments on commit 94a7936

Please sign in to comment.