diff --git a/compose/compose-file/compose-file-v3.md b/compose/compose-file/compose-file-v3.md index 9c92c5244a..49e34b0267 100644 --- a/compose/compose-file/compose-file-v3.md +++ b/compose/compose-file/compose-file-v3.md @@ -1592,8 +1592,18 @@ 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). +If you'd like to use IPv6, you must first ensure that the Docker daemon is configured to support IPv6. See [Enable IPv6](../../config/daemon/ipv6.md) for detailed instructions. You can then access IPv6 addressing 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: + +```yaml + 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: