createCommand.withPublishAllPorts(true);
@Override public CreateContainerCmd build(ServiceDescriptor sd, CreateContainerCmd cmd, PublishPorts pp) { return cmd.withPublishAllPorts(true); }
List<Bind> binds = new ArrayList<>(); binds.add(new Bind("//var/run/docker.sock", new Volume("/var/run/docker.sock"))); String ryukContainerId = client.createContainerCmd(ryukImage).withHostConfig(new HostConfig().withAutoRemove(true)).withExposedPorts(new ExposedPort(8080)).withPublishAllPorts(true).withName("testcontainers-ryuk-" + DockerClientFactory.SESSION_ID).withLabels(Collections.singletonMap(DockerClientFactory.TESTCONTAINERS_LABEL, "true")).withBinds(binds).withPrivileged(TestcontainersConfiguration.getInstance().isRyukPrivileged()).exec().getId(); client.startContainerCmd(ryukContainerId).exec(); InspectContainerResponse inspectedContainer = client.inspectContainerCmd(ryukContainerId).exec();
cmd.withPublishAllPorts(true); cmd.withPrivileged(conf.isPrivileged()); cmd.withNetworkMode(conf.getNetworkMode());
containerConfig.withPublishAllPorts(bindAllPorts);
createCommand.withNetworkMode(networkForLinks.get()); createCommand.withPublishAllPorts(true); PortForwardingContainer.INSTANCE.getNetwork().ifPresent(it -> { withExtraHost(INTERNAL_HOST_HOSTNAME, it.getIpAddress());
CreateContainerResponse resp = cfgCmd.withPublishAllPorts(publishAllPorts).withPrivileged(privileged).exec(); InspectContainerResponse inspectResp = client.inspectContainerCmd(resp.getId()).exec();
createContainerCmd.withPublishAllPorts(containerConfiguration.getPublishAllPorts());
createContainerCmd.withPublishAllPorts(containerConfiguration.getPublishAllPorts());