withExposedPorts method

DockerContainer withExposedPorts(
  1. List<int> exposedPorts
)

Exposes each port in exposedPorts with an ephemeral host port.

Equivalent to calling withBindPorts(p, null) for each p.

Returns this for chaining.

Implementation

DockerContainer withExposedPorts(List<int> exposedPorts) {
  for (final p in exposedPorts) {
    _ports[p] = null;
  }
  return this;
}