MCPcopy Create free account
hub / github.com/containerd/nerdctl / PortCommand

Function PortCommand

cmd/nerdctl/container/container_port.go:35–46  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

33)
34
35func PortCommand() *cobra.Command {
36 var cmd = &cobra.Command{
37 Use: "port [flags] CONTAINER [PRIVATE_PORT[/PROTO]]",
38 Args: cobra.RangeArgs(1, 2),
39 Short: "List port mappings or a specific mapping for the container",
40 RunE: portAction,
41 ValidArgsFunction: portShellComplete,
42 SilenceUsage: true,
43 SilenceErrors: true,
44 }
45 return cmd
46}
47
48func portAction(cmd *cobra.Command, args []string) error {
49 globalOptions, err := helpers.ProcessRootCmdFlags(cmd)

Callers 2

newAppFunction · 0.92
CommandFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…