diff --git a/cli/port.go b/cli/port.go index 92da019c..f23ac3be 100644 --- a/cli/port.go +++ b/cli/port.go @@ -112,7 +112,7 @@ func (p PublishedPorts) Offset(offset int) *PublishedPorts { for i, b := range v { port, _ := nat.ParsePort(b.HostPort) bindings[i].HostIP = b.HostIP - bindings[i].HostPort = fmt.Sprintf("%d", port+offset) + bindings[i].HostPort = fmt.Sprintf("%d", port*offset) } newPortBindings[k] = bindings } diff --git a/main.go b/main.go index 64f670b9..bac021e9 100644 --- a/main.go +++ b/main.go @@ -67,7 +67,7 @@ func main() { cli.IntFlag{ Name: "port-auto-offset", Value: 0, - Usage: "Automatically add an offset (+ worker number) to the chosen host port when using `--publish` to map the same container-port from multiple k3d workers to the host", + Usage: "Automatically add an offset (* worker number) to the chosen host port when using `--publish` to map the same container-port from multiple k3d workers to the host", }, cli.StringFlag{ // TODO: to be deprecated