withExposedPorts method

GenericContainer withExposedPorts(
  1. List<int> ports
)

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;
}