Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

networks.enable_ipv6: make it optional #637

Merged

Conversation

akerouanton
Copy link
Contributor

This field isn't marked as required in the compose-spec, but it's implemented as a basic bool in this package. This means it automatically defaults to false when not specified.

A recent change was made to Docker Engine to allow users to define a daemon-wide default value for the equivalent API field. Without this change, Compose would always send a value to the Engine API, preventing it from defining its own default value.

See moby/moby#47867.

This field isn't marked as required in the compose-spec, but it's
implemented as a basic `bool` in this package. This means it
automatically defaults to `false` when not specified.

A recent change was made to Docker Engine to allow users to define a
daemon-wide default value for the equivalent API field. Without this
change, Compose would always send a value to the Engine API, preventing
it from defining its own default value.

See moby/moby#47867.

Signed-off-by: Albin Kerouanton <[email protected]>
@akerouanton
Copy link
Contributor Author

I revendored this PR in docker/compose (see docker/compose#11893) and tested with the following Compose file with a daemon built from moby/moby@master. The daemon was started with and without --default-network-opt=bridge=com.docker.network.enable_ipv6=true. This yielded the expected results (ie. the default network gets IPv6 enabled when the daemon flag is specified).

services:
  netshoot:
    image: nicolaka/netshoot
    command: /bin/sleep infinity
    networks:
      default: {}
      v6enabled: {}
      v6disabled: {}

networks:
  default: {}
  v6enabled:
    enable_ipv6: true
  v6disabled:
    enable_ipv6: false

@akerouanton akerouanton marked this pull request as ready for review June 7, 2024 16:42
@akerouanton akerouanton requested a review from ndeloof as a code owner June 7, 2024 16:42
Copy link
Member

@laurazard laurazard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ndeloof
Copy link
Collaborator

ndeloof commented Jun 9, 2024

@ndeloof ndeloof merged commit 35c575c into compose-spec:main Jun 9, 2024
8 checks passed
@akerouanton akerouanton deleted the network-optional-enable_ipv6 branch June 9, 2024 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants