</BUG>
.withMemory(service.getMemLimit())
.withNetworkMode(networkName)
.withLinks(toArrayIfNotNull(service.getLinks()))
.withPortBindings(service.getPorts()
<BUG>.stream()
.collect(toMap(Function.identity(),
value -> new PortBinding[0])))</BUG>
.withVolumesFrom(toArrayIfNotNull(service.getVolumesFrom()));
ContainerConfig config = new ContainerConfig();

EndpointConfig endpointConfig = new EndpointConfig().withAliases(machineName)
.withLinks(toArrayIfNotNull(service.getLinks()));
NetworkingConfig networkingConfig = new NetworkingConfig().withEndpointsConfig(singletonMap(networkName,
endpointConfig));
HostConfig hostConfig = new HostConfig();
hostConfig.withMemorySwap(machineMemorySwap)
.withMemory(service.getMemLimit())
.withNetworkMode(networkName)
.withLinks(toArrayIfNotNull(service.getLinks()))
.withPortBindings(service.getPorts()
.stream()
.collect(toMap(Function.identity(), value -> new PortBinding[0])))
.withVolumesFrom(toArrayIfNotNull(service.getVolumesFrom()));
ContainerConfig config = new ContainerConfig();
