Port matching breaks when consecutive ports are exposed
hughsimpson opened this issue · 0 comments
hughsimpson commented
What happened?
Suppose a docker-compose maps sequential ports, such as
ports:
- "9092:9092"
- "9093:9093"
Then the output of docker ps will be 0.0.0.0:9092-9093->9092-9093/tcp
which doesn't match the expected pattern of "((\\d+).(\\d+).(\\d+).(\\d+)):(\\d+)->(\\d+)/tcp"
What did you want to happen?
These ports should be picked up - should be a relatively simple change to public static Ports parseFromDockerComposePs(String psOutput, String dockerMachineIp)
to also check against the pattern "((\\d+).(\\d+).(\\d+).(\\d+)):(\\d+)-(\\d+)->(\\d+)-(\\d+)/tcp"
and extract all ports from such ranges