Enable IPv6 on compose networks where enable_ipv6 is true #3686
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There is a compose feature called enable_ipv6 that can be set on a network.
When this is currently set on a compose network, it has no effect. Compose does let us know that the EnableIPv6 flag is ignored, though.
However,
nerdctl network create
does support IPv6, it can be set using the--ipv6
flag. When the--ipv6
flag is set, IPv6 IPAM is added just like IPv4 IPAM to the network. However, when--ipv6
is not set, the IPv6 IPAM is ignored and only the IPv4 settings are added.We should add support for
enable_ipv6
. This PR aims just to do that.Please note that this is not enough for compose to support IPv6... see issue #3637. I'm not yet familiar enough with the codebase to add such a feature. But this should allow manual configuration.
Added two tests: