From b3176090baa3e973d113f56986be521349887b27 Mon Sep 17 00:00:00 2001 From: Simon Li Date: Fri, 13 Oct 2023 23:11:49 +0100 Subject: [PATCH] Fix order of ports in `--publish` --- repo2podman/podman.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/repo2podman/podman.py b/repo2podman/podman.py index 6c5043a..68ff3a4 100644 --- a/repo2podman/podman.py +++ b/repo2podman/podman.py @@ -525,10 +525,11 @@ def run( cmdargs.append("--publish-all") ports = ports or {} + # container-port/protocol:host-port for k, v in ports.items(): if k.endswith("/tcp"): k = k[:-4] - cmdargs.extend(["--publish", "{}:{}".format(k, v)]) + cmdargs.extend(["--publish", "{}:{}".format(v, k)]) cmdargs.append("--detach")