The Wayback Machine - https://web.archive.org/web/20240828120753/https://github.com/docker/cli/pull/5365
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

[27.x backport] cli/formatter: bracket IPv6 addrs prepended to ports #5365

Merged
merged 1 commit into from
Aug 22, 2024

Conversation

vvoland
Copy link
Collaborator

@vvoland vvoland commented Aug 21, 2024

- What I did

On docker ps, port bindings with an IPv6 HostIP should have their addresses put into brackets when joining them to their ports.

RFC 3986 (Section 3.2.2) stipulates that IPv6 addresses should be enclosed within square brackets. This RFC is only about URIs. However, doing so here helps user identifier what's part of the IP address and what's the port. It also makes it easier to copy/paste that '[addr]:port' into other software (including browsers).

- How to verify it

CI, or run the following commands with a recent Engine:

$ docker run --rm -d --name c0 -p 8000:80/tcp 5201/udp alpine top
$ docker ps

- Description for the changelog

- IPv6 addresses shown by `docker ps` in port bindings are now bracketed

On `docker ps`, port bindings with an IPv6 HostIP should have their
addresses put into brackets when joining them to their ports.

RFC 3986 (Section 3.2.2) stipulates that IPv6 addresses should be
enclosed within square brackets. This RFC is only about URIs. However,
doing so here helps user identifier what's part of the IP address and
what's the port. It also makes it easier to copy/paste that
'[addr]:port' into other software (including browsers).

Signed-off-by: Albin Kerouanton <albinker@gmail.com>
(cherry picked from commit 964155c)
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
@codecov-commenter
Copy link

codecov-commenter commented Aug 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 60.98%. Comparing base (a58af37) to head (6ceb0ab).
Report is 5 commits behind head on 27.x.

Additional details and impacted files
@@           Coverage Diff           @@
##             27.x    #5365   +/-   ##
=======================================
  Coverage   60.97%   60.98%           
=======================================
  Files         304      304           
  Lines       21358    21359    +1     
=======================================
+ Hits        13024    13025    +1     
  Misses       7404     7404           
  Partials      930      930           

@vvoland vvoland merged commit 5805df0 into docker:27.x Aug 22, 2024
87 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.

None yet

3 participants