From f0435fd3f32dc34ceb67677a3a7ead50fab10977 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Thu, 1 Dec 2022 10:20:57 +0100 Subject: [PATCH] cli/command/container: runPort(): update godoc, and add todo We should consider showing all mappings for a given port if no specific proto was specified. Signed-off-by: Sebastiaan van Stijn --- cli/command/container/port.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cli/command/container/port.go b/cli/command/container/port.go index cee721390e..12d227707e 100644 --- a/cli/command/container/port.go +++ b/cli/command/container/port.go @@ -43,6 +43,12 @@ func NewPortCommand(dockerCli command.Cli) *cobra.Command { return cmd } +// runPort shows the port mapping for a given container. Optionally, it +// allows showing the mapping for a specific (container)port and proto. +// +// TODO(thaJeztah): currently this defaults to show the TCP port if no +// proto is specified. We should consider changing this to "any" protocol +// for the given private port. func runPort(dockerCli command.Cli, opts *portOptions) error { ctx := context.Background()