From 21c517a0264191c8fa99289e70f6952145ccf8ca Mon Sep 17 00:00:00 2001 From: new-guy Date: Mon, 8 Jan 2018 14:30:35 -0600 Subject: [PATCH] Note about setting ipv4/ipv6 not working in swarm (#5466) * Note about setting ipv4/ipv6 not working in swarm I spent a few hours yesterday assuming this was possible, but it turns out it isn't. Hopefully this will help prevent others from making the same mistake I did. --- compose/compose-file/index.md | 42 +++++++++++++++++++---------------- 1 file changed, 23 insertions(+), 19 deletions(-) diff --git a/compose/compose-file/index.md b/compose/compose-file/index.md index 4abc0b9f65..b6039d9b9b 100644 --- a/compose/compose-file/index.md +++ b/compose/compose-file/index.md @@ -1306,30 +1306,34 @@ The corresponding network configuration in the addressing is desired, the [`enable_ipv6`](#enableipv6) option must be set, and you must use a version 2.x Compose file, such as the one below. +> **Note**: These options do not currently work in swarm mode. + An example: - version: '2.1' - - services: - app: - image: busybox - command: ifconfig - networks: - app_net: - ipv4_address: 172.16.238.10 - ipv6_address: 2001:3984:3989::10 +```yaml +version: '2.1' +services: + app: + image: busybox + command: ifconfig networks: app_net: - driver: bridge - enable_ipv6: true - ipam: - driver: default - config: - - - subnet: 172.16.238.0/24 - - - subnet: 2001:3984:3989::/64 + ipv4_address: 172.16.238.10 + ipv6_address: 2001:3984:3989::10 + +networks: + app_net: + driver: bridge + enable_ipv6: true + ipam: + driver: default + config: + - + subnet: 172.16.238.0/24 + - + subnet: 2001:3984:3989::/64 +``` ### pid