diff --git a/docker-gen.go b/docker-gen.go index be247e82..300d1a3e 100644 --- a/docker-gen.go +++ b/docker-gen.go @@ -39,7 +39,9 @@ type Address struct { IP string Port string HostPort string + Proto string } + type RuntimeContainer struct { ID string Addresses []Address diff --git a/docker_client.go b/docker_client.go index 0640cb1b..cd9f7fd8 100644 --- a/docker_client.go +++ b/docker_client.go @@ -220,8 +220,9 @@ func getContainers(client *docker.Client) ([]*RuntimeContainer, error) { } for k, v := range container.NetworkSettings.Ports { address := Address{ - IP: container.NetworkSettings.IPAddress, - Port: k.Port(), + IP: container.NetworkSettings.IPAddress, + Port: k.Port(), + Proto: k.Proto(), } if len(v) > 0 { address.HostPort = v[0].HostPort