GoogleContainerTools / GoogleContainerTools/container-structure-test
Exposed Ports Metadata test fails if the protocol is specified.
Open
bug
help wanted
- Dominant language
- Go
- Stars
- 2.5k
- Forks
- 212
- PR merge metrics
- No merged PRs in 30d
Description
The cst fails in case the Dockerfile of the image under test contains ```EXPOSE /``` form. I stumbled upon it while exposing an udp port but verified it happens even with explicitly specifying tcp protocol.
On quick search through source, seems the code only making use of the \ part not the \ part in {host,tar}_driver.go :
```golang
...
for p := range config.ExposedPorts {
// docker always appends the protocol to the port, so this is safe
ports = append(ports, strings.Split(p, "/")[0])
}
...
```
Contributor guide
Assessment
This issue has not been assessed yet.