public class DockerService extends Object
| Constructor and Description |
|---|
DockerService(Config config,
InternalPreferences preferences) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
String |
execCommandInContainer(String containerId,
String... command) |
String |
getBindPort(String containerId,
String exposed) |
Config |
getConfig() |
String |
getDockerDefaultSocket() |
int |
getDockerPollTimeMs() |
int |
getDockerWaitTimeoutSec() |
String |
getHost(String containerId,
String network) |
void |
pullImage(String imageId) |
void |
removeContainer(String containerId) |
String |
startContainer(DockerContainer dockerContainer) |
void |
stopAndRemoveContainer(String containerId,
String imageId) |
void |
stopContainer(String containerId) |
void |
updateDockerClient(String url) |
public DockerService(Config config, InternalPreferences preferences)
public String getHost(String containerId, String network) throws com.github.dockerjava.api.exception.DockerException
com.github.dockerjava.api.exception.DockerExceptionpublic String startContainer(DockerContainer dockerContainer) throws com.github.dockerjava.api.exception.DockerException
com.github.dockerjava.api.exception.DockerExceptionpublic String execCommandInContainer(String containerId, String... command) throws com.github.dockerjava.api.exception.DockerException
com.github.dockerjava.api.exception.DockerExceptionpublic String getBindPort(String containerId, String exposed) throws com.github.dockerjava.api.exception.DockerException
com.github.dockerjava.api.exception.DockerExceptionpublic void pullImage(String imageId) throws com.github.dockerjava.api.exception.DockerException, InterruptedException
com.github.dockerjava.api.exception.DockerExceptionInterruptedExceptionpublic void stopContainer(String containerId) throws com.github.dockerjava.api.exception.DockerException
com.github.dockerjava.api.exception.DockerExceptionpublic void removeContainer(String containerId) throws com.github.dockerjava.api.exception.DockerException
com.github.dockerjava.api.exception.DockerExceptionpublic String getDockerDefaultSocket()
public int getDockerWaitTimeoutSec()
public int getDockerPollTimeMs()
public void close()
throws IOException
IOExceptionpublic void updateDockerClient(String url)
public Config getConfig()
Copyright © 2021. All rights reserved.