public class DockerMachine extends AbstractCliInternetAddressResolver
| Modifier and Type | Field and Description |
|---|---|
static String |
DOCKER_MACHINE_EXEC |
commandLineExecutor, DOCKERHOST_TAG| Constructor and Description |
|---|
DockerMachine(CommandLineExecutor commandLineExecutor) |
| Modifier and Type | Method and Description |
|---|---|
void |
createMachine(String machinePath,
String machineDriver,
String machineName) |
protected String[] |
getCommandArguments(String cliPathExec) |
protected Pattern |
getIpPattern() |
void |
grantPermissionToDockerMachine(String machinePath) |
boolean |
isDockerMachineInstalled()
Checks if Docker Machine is installed by running docker-machine and inspect the result.
|
boolean |
isDockerMachineInstalled(String cliPathExec)
Checks if Docker Machine is installed by running docker-machine and inspect the result.
|
boolean |
isManuallyStarted() |
Set<Machine> |
list()
Executes docker-machine ls command
|
Set<Machine> |
list(String cliPathExec)
Executes docker-machine ls command
|
Set<Machine> |
list(String field,
String value)
Executes docker-machine ls --filter field=value command
|
Set<Machine> |
list(String cliPathExec,
String field,
String value)
Executes docker-machine ls --filter field=value command
|
void |
setMachineName(String machineName) |
void |
startDockerMachine(String machineName)
Starts given docker machine.
|
void |
startDockerMachine(String cliPathExec,
String machineName)
Starts given docker machine.
|
void |
stopDockerMachine(String machineName) |
void |
stopDockerMachine(String cliPathExec,
String machineName) |
ippublic static final String DOCKER_MACHINE_EXEC
public DockerMachine(CommandLineExecutor commandLineExecutor)
protected String[] getCommandArguments(String cliPathExec)
getCommandArguments in class AbstractCliInternetAddressResolverprotected Pattern getIpPattern()
getIpPattern in class AbstractCliInternetAddressResolverpublic void setMachineName(String machineName)
public boolean isManuallyStarted()
public void startDockerMachine(String cliPathExec, String machineName)
cliPathExec - location of docker-machine or null if it is on PATH.machineName - to be started.public void startDockerMachine(String machineName)
machineName - to be started.public void stopDockerMachine(String machineName)
public boolean isDockerMachineInstalled(String cliPathExec)
cliPathExec - location of docker-machine or null if it is on PATH.public boolean isDockerMachineInstalled()
public Set<Machine> list(String cliPathExec)
cliPathExec - location of docker-machine or null if it is on PATH.public Set<Machine> list(String cliPathExec, String field, String value)
cliPathExec - location of docker-machine or null if it is on PATH.field - to use in conditionvalue - value that the field should havepublic Set<Machine> list(String field, String value)
field - to use in conditionvalue - value that the field shoudl havepublic void grantPermissionToDockerMachine(String machinePath)
Copyright © 2018 JBoss by Red Hat. All rights reserved.