Skip to content

Commit 21c517a

Browse files
new-guyMisty Stanley-Jones
authored and
Misty Stanley-Jones
committed
Note about setting ipv4/ipv6 not working in swarm (docker#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.
1 parent f896054 commit 21c517a

File tree

1 file changed

+23
-19
lines changed

1 file changed

+23
-19
lines changed

compose/compose-file/index.md

+23-19
Original file line numberDiff line numberDiff line change
@@ -1306,30 +1306,34 @@ The corresponding network configuration in the
13061306
addressing is desired, the [`enable_ipv6`](#enableipv6) option must be set, and
13071307
you must use a version 2.x Compose file, such as the one below.
13081308

1309-
An example:
1309+
> **Note**: These options do not currently work in swarm mode.
13101310
1311-
version: '2.1'
1311+
An example:
13121312

1313-
services:
1314-
app:
1315-
image: busybox
1316-
command: ifconfig
1317-
networks:
1318-
app_net:
1319-
ipv4_address: 172.16.238.10
1320-
ipv6_address: 2001:3984:3989::10
1313+
```yaml
1314+
version: '2.1'
13211315

1316+
services:
1317+
app:
1318+
image: busybox
1319+
command: ifconfig
13221320
networks:
13231321
app_net:
1324-
driver: bridge
1325-
enable_ipv6: true
1326-
ipam:
1327-
driver: default
1328-
config:
1329-
-
1330-
subnet: 172.16.238.0/24
1331-
-
1332-
subnet: 2001:3984:3989::/64
1322+
ipv4_address: 172.16.238.10
1323+
ipv6_address: 2001:3984:3989::10
1324+
1325+
networks:
1326+
app_net:
1327+
driver: bridge
1328+
enable_ipv6: true
1329+
ipam:
1330+
driver: default
1331+
config:
1332+
-
1333+
subnet: 172.16.238.0/24
1334+
-
1335+
subnet: 2001:3984:3989::/64
1336+
```
13331337
13341338
### pid
13351339

0 commit comments

Comments
 (0)