diff --git a/container.go b/container.go index 6cf35ec70e..419ba84d29 100644 --- a/container.go +++ b/container.go @@ -133,7 +133,11 @@ type PortBinding struct { type Port string func (p Port) Proto() string { - return strings.Split(string(p), "/")[1] + parts := strings.Split(string(p), "/") + if len(parts) == 1 { + return "tcp" + } + return parts[1] } func (p Port) Port() string {