Skip to content

Commit

Permalink
Fix order of ports in --publish
Browse files Browse the repository at this point in the history
  • Loading branch information
manics committed Oct 13, 2023
1 parent e5c14c5 commit b317609
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion repo2podman/podman.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down

0 comments on commit b317609

Please sign in to comment.