createCommand.withExtraHosts(extraHostsArray);
cmd.withExtraHosts(extraHosts.toArray(new String[extraHosts.size()])); logger.info(" - extra hosts " + conf.getExtraHosts());
containerConfig.withExtraHosts(extraHosts.toArray(new String[extraHosts.size()]));
}); String[] extraHostsArray = extraHosts.stream().toArray(String[]::new); createCommand.withExtraHosts(extraHostsArray); if (network != null) { createCommand.withNetworkMode(network.getId());
? cmd.withNetworkMode("host").withExtraHosts(extraHosts).withPrivileged(true) : cmd.withExtraHosts(extraHosts).withPrivileged(true); } else if (SystemUtils.IS_OS_LINUX || SystemUtils.IS_OS_MAC) { cmd = microservice.isRootHostAccess() ? cmd.withNetworkMode("host").withPrivileged(true) : cmd.withExtraHosts(extraHosts).withPrivileged(true);
cfgCmd.withExtraHosts(extraHostsRes);
@Override protected CreateContainerCmd dockerCommand() { ExposedPort exposedPort = ExposedPort.tcp(MARATHON_PORT); Ports portBindings = new Ports(); if (getCluster().isMapPortsToHost()) { portBindings.bind(exposedPort, Ports.Binding.bindPort(MARATHON_PORT)); } return DockerClientFactory.build().createContainerCmd(config.getImageName() + ":" + config.getImageTag()) .withName(getName()) .withExtraHosts("minimesos-zookeeper:" + this.zooKeeper.getIpAddress()) .withCmd(CollectionsUtils.splitCmd(config.getCmd())) .withExposedPorts(exposedPort) .withPortBindings(portBindings); }
createContainerCmd.withExtraHosts(containerConfiguration.getExtraHosts().toArray(new String[0]));
createContainerCmd.withExtraHosts(containerConfiguration.getExtraHosts().toArray(new String[0]));