public class DockerHost extends Object
| Modifier and Type | Field and Description |
|---|---|
private String |
address |
private URI |
bindURI |
static String |
DEFAULT_HOST |
static int |
DEFAULT_PORT |
static String |
DEFAULT_UNIX_ENDPOINT |
private String |
dockerCertPath |
private String |
host |
private int |
port |
private URI |
uri |
| Modifier | Constructor and Description |
|---|---|
private |
DockerHost(String endpoint,
String dockerCertPath) |
| Modifier and Type | Method and Description |
|---|---|
String |
address()
Get the Docker ip address or hostname.
|
URI |
bindURI()
Get the Docker rest bind uri.
|
private static int |
defaultPort() |
String |
dockerCertPath()
Get the path to certificate and key for connecting to Docker via HTTPS.
|
static DockerHost |
from(String endpoint,
String dockerCertPath)
Create a
DockerHost from an explicit address or uri. |
static DockerHost |
fromEnv()
Create a
DockerHost from DOCKER_HOST and DOCKER_PORT env vars. |
String |
host()
Get a Docker endpoint usable for instantiating a new DockerHost with
DockerHost.from(endpoint).
|
int |
port()
Get the Docker endpoint port.
|
String |
toString() |
URI |
uri()
Get the Docker rest uri.
|
public static final int DEFAULT_PORT
public static final String DEFAULT_HOST
public static final String DEFAULT_UNIX_ENDPOINT
private final String host
private final URI uri
private final URI bindURI
private final String address
private final int port
private final String dockerCertPath
public String host()
public URI uri()
public URI bindURI()
public int port()
public String address()
public String dockerCertPath()
public static DockerHost fromEnv()
DockerHost from DOCKER_HOST and DOCKER_PORT env vars.public static DockerHost from(String endpoint, String dockerCertPath)
DockerHost from an explicit address or uri.endpoint - The Docker endpoint.dockerCertPath - The certificate path.private static int defaultPort()
Copyright © 2016. All rights reserved.