withExposedPorts method
Publishes the container's TCP ports on random free ports of the
host; mappedPort says which.
Implementation
GenericContainer withExposedPorts(List<int> ports) {
for (final port in ports) {
if (!_ports.contains(port)) {
_ports.add(port);
}
}
return this;
}