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

Docs: host-gateway-ip daemon option IPv4+IPv6 #5607

Merged
merged 3 commits into from
Nov 29, 2024

Conversation

robmry
Copy link
Contributor

@robmry robmry commented Nov 11, 2024

- What I did

Depends on:

The host-gateway-ip daemon option now accepts two addresses, one IPv4 and one IPv6.

- How I did it

- How to verify it

- Description for the changelog

n/a

@robmry robmry added this to the 28.0.0 milestone Nov 11, 2024
@robmry robmry self-assigned this Nov 11, 2024
@codecov-commenter
Copy link

codecov-commenter commented Nov 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 59.53%. Comparing base (3be8b8c) to head (c629eca).
Report is 4 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #5607   +/-   ##
=======================================
  Coverage   59.53%   59.53%           
=======================================
  Files         346      346           
  Lines       29357    29357           
=======================================
  Hits        17477    17477           
  Misses      10910    10910           
  Partials      970      970           

@robmry robmry force-pushed the v6only/host_gateway_ip branch 2 times, most recently from f92dc3f to 1864129 Compare November 27, 2024 16:45
@robmry robmry marked this pull request as ready for review November 27, 2024 16:46
@robmry robmry requested review from thaJeztah and a team as code owners November 27, 2024 16:46
@@ -62,8 +62,7 @@ Options:
-G, --group string Group for the unix socket (default "docker")
--help Print usage
-H, --host list Daemon socket(s) to connect to
--host-gateway-ip ip IP address that the special 'host-gateway' string in --add-host resolves to.
Defaults to the IP address of the default bridge
--host-gateway-ip list IP addresses that the special 'host-gateway' string in --add-host resolves to. Defaults to the IP addresses of the default bridge
Copy link
Member

Choose a reason for hiding this comment

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

Oh! Can you manually wrap / format this one? This page is still manually maintained and this block rendered as a code-block, so wrapping reduces horizontal scrolling; see https://docs.docker.com/reference/cli/dockerd/

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will do ... I did that at first, then thought maybe it was supposed to exactly match the --help output. Doh!

host-gateway-ip isn't a new option, but it's not in the manpage in this repo or moby ... I'll add it.

Copy link
Member

Choose a reason for hiding this comment

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

Yeah we really need to;

  • update our packaging to use the man-page from moby/moby instead (and remove the man page from this repo)
  • look at moving the dockerd reference docs to moby/moby, and use the "docs-generator" to generate these flag-descriptions and the "YAML" docs so that we can use the same formatting as the other reference docs.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've fixed the dockerd.md formatting, and added --host-gateway to the manpage (also put --help in the right place).

I'll make the same changes to moby's copy of the manpage.

The host-gateway-ip daemon option now accepts two addresses, one
IPv4 and one IPv6.

Signed-off-by: Rob Murray <[email protected]>
@@ -63,8 +63,8 @@ Options:
-G, --group string Group for the unix socket (default "docker")
--help Print usage
-H, --host list Daemon socket(s) to connect to
--host-gateway-ip ip IP address that the special 'host-gateway' string in --add-host resolves to.
Defaults to the IP address of the default bridge
--host-gateway-ip list IP addresses that the special 'host-gateway' string in --add-host resolves to.
Copy link
Member

Choose a reason for hiding this comment

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

I hate Cobra for this; we should probably look if we can make it show a custom type. "list" is ... not very informative. The ugly bit is that Cobra doesn't allow you to set it per flag, but it's really tied to the type you're using 😞 (perhaps we can come with some trickery to initialise it for a specific flag 🤔)

Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

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

LGTM

@thaJeztah thaJeztah merged commit 61b02e6 into docker:master Nov 29, 2024
89 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants