From a11bbe2eecf0ce31cd2845eda89a9ca5b0134a17 Mon Sep 17 00:00:00 2001 From: Marc Cataford Date: Fri, 27 Sep 2024 00:03:20 -0400 Subject: [PATCH] feat: add port type support --- podman/main.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/podman/main.go b/podman/main.go index 77a0a54..76f4cdb 100644 --- a/podman/main.go +++ b/podman/main.go @@ -41,7 +41,12 @@ func CreatePod(name string, ports []service_definition.PortMapping) error { args := []string{"pod", "create", "--replace"} for _, portMapping := range ports { - portArgs := []string{"-p", portMapping.Host + ":" + portMapping.Container} + portMapStr := portMapping.Host + ":" + portMapping.Container + + if portMapping.Type != "" { + portMapStr = portMapStr + "/" + portMapping.Type + } + portArgs := []string{"-p", portMapStr} args = append(args, portArgs...) }