Skip to content

Commit 59a7b25

Browse files
committed
Enable IPv6 on compose networks where enable_ipv6 is true
Signed-off-by: Derzsi Dániel <[email protected]>
1 parent 6ff09eb commit 59a7b25

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pkg/composer/up_network.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ func (c *Composer) upNetwork(ctx context.Context, shortName string) error {
3636
return nil
3737
}
3838

39-
if unknown := reflectutil.UnknownNonEmptyFields(&net, "Name", "Ipam", "Driver", "DriverOpts"); len(unknown) > 0 {
39+
if unknown := reflectutil.UnknownNonEmptyFields(&net, "Name", "Ipam", "Driver", "DriverOpts", "EnableIPv6"); len(unknown) > 0 {
4040
log.G(ctx).Warnf("Ignoring: network %s: %+v", shortName, unknown)
4141
}
4242

@@ -83,6 +83,10 @@ func (c *Composer) upNetwork(ctx context.Context, shortName string) error {
8383
}
8484
}
8585

86+
if *net.EnableIPv6 {
87+
createArgs = append(createArgs, "--ipv6")
88+
}
89+
8690
createArgs = append(createArgs, fullName)
8791

8892
if c.DebugPrintFull {

0 commit comments

Comments
 (0)