The Wayback Machine - https://web.archive.org/web/20251014212013/https://github.com/docker/cli/pull/404
Skip to content

Conversation

thaJeztah
Copy link
Member

fixes #402

Ports that were picked from the ephemeral port range were presented as *:0->80/tcp.

This patch changes the presentation to use the actually assigned port, instead of the port specified in Endpoint.Spec (which is always empty/zero (0))

Before this change;

ID                  NAME                MODE                REPLICAS            IMAGE               PORTS
5d44i665qj66        with-random-port    replicated          1/1                 nginx:alpine        *:0->80/tcp

After this change;

ID                  NAME                MODE                REPLICAS            IMAGE               PORTS
5d44i665qj66        with-random-port    replicated          1/1                 nginx:alpine        *:30000->80/tcp

Ports that were picked from the ephemeral port range
were presented as `*:0->80/tcp`.

This patch changes the presentation to use the
actually assigned port, instead of the port specified
in `Endpoint.Spec` (which is always empty/zero (`0`))

Before this change;

    ID                  NAME                MODE                REPLICAS            IMAGE               PORTS
    5d44i665qj66        with-random-port    replicated          1/1                 nginx:alpine        *:0->80/tcp

After this change;

    ID                  NAME                MODE                REPLICAS            IMAGE               PORTS
    5d44i665qj66        with-random-port    replicated          1/1                 nginx:alpine        *:30000->80/tcp

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@codecov-io
Copy link

codecov-io commented Aug 1, 2017

Codecov Report

Merging #404 into master will not change coverage.
The diff coverage is 50%.

@@          Coverage Diff           @@
##           master    #404   +/-   ##
======================================
  Coverage    46.2%   46.2%           
======================================
  Files         193     193           
  Lines       16092   16092           
======================================
  Hits         7435    7435           
  Misses       8270    8270           
  Partials      387     387

Copy link
Contributor

@dnephin dnephin left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Collaborator

@vdemeester vdemeester left a comment

Choose a reason for hiding this comment

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

LGTM 🐸

@vdemeester vdemeester merged commit 772956b into docker:master Aug 1, 2017
@GordonTheTurtle GordonTheTurtle added this to the 17.08.0 milestone Aug 1, 2017
@thaJeztah thaJeztah deleted the fix-port-presentation branch August 1, 2017 19:57
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.

Presentation of host-port of services with a randomly assigned port is incorrect

5 participants