Skip to content

Exposed Ports Metadata test fails if the protocol is specified.  #240

Open
@richnusgeeks

Description

@richnusgeeks

The cst fails in case the Dockerfile of the image under test contains EXPOSE <port>/<protocol> 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 <port> part not the <protocol> part in {host,tar}_driver.go :

...
for p := range config.ExposedPorts {
		// docker always appends the protocol to the port, so this is safe
		ports = append(ports, strings.Split(p, "/")[0])
	}
...

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions