/** * Address of docker host. <b>Please note this is address of docker host as seen by docker client library * so it may not be valid docker host address in different contexts</b>. * <br/> * For example, if tests are run in unix-like environment with docker host on the same machine, * it will contain 'localhost' and will not point to docker host from inside container. * In such cases one should use {@link #getDockerContainerGateway()}. */ public final String getDockerHost() { return dockerClient.getHost(); }
/** * Utility method to get the docker host. * Can be different from localhost if using docker-machine * * @return The current docker host */ public String getDockerHost() { return dockerClient.getHost(); }
public String getHost() { return dockerClient.getHost(); }
private void logNetworkSettings() { log.info("{} docker host: {}, ip: {}, gateway: {}, exposed ports: {}", containerShortId, dockerClient.getHost(), containerIp, containerGateway, containerPorts); }
public String getHost(String containerId, String network) throws DockerException, InterruptedException { return IS_OS_LINUX ? dockerClient.inspectContainer(containerId).networkSettings() .networks().get(network).gateway() : dockerClient.getHost(); }
StringBuffer sb = new StringBuffer("discoverNodes(): via DOCKER_HOST: " + docker.getHost() + "\n"); sb.append("docker-network-names = " + this.getRawDockerNetworkNames() + "\n"); sb.append("docker-service-names = " + this.getRawDockerServiceNames() + "\n");
try { docker.getDockerClient(runtimeConfig.getProviderId()).inspectContainer(id); host = docker.getDockerClient(runtimeConfig.getProviderId()).getHost(); } catch (DockerException | InterruptedException ex) { throw new ProvisioningException("Error Getting Docker Container info: " + id + "with error: " + ex.getMessage(),
try { docker.getDockerClient(runtimeConfig.getProviderId()).inspectContainer(id); host = docker.getDockerClient(runtimeConfig.getProviderId()).getHost(); } catch (DockerException | InterruptedException ex) { throw new ProvisioningException("Error Getting Docker Container info: " + id + "with error: " + ex.getMessage(),
return new Container(containerInfo, targetPortToHostPortLookup, client.getHost(), client);