public class WindowsDockerClient extends DockerClient
CLIENT_TIMEOUT, DOCKER_DATE_TIME_FORMAT| Constructor and Description |
|---|
WindowsDockerClient(Launcher launcher,
Node node,
String toolName) |
| Modifier and Type | Method and Description |
|---|---|
com.google.common.base.Optional<String> |
getContainerIdIfContainerized()
Checks if this
DockerClient instance is running inside a container and returns the id of the container
if so. |
List<String> |
listProcess(EnvVars launchEnv,
String containerId) |
String |
run(EnvVars launchEnv,
String image,
String args,
String workdir,
Map<String,String> volumes,
Collection<String> volumesFromContainers,
EnvVars containerEnv,
String user,
String... command)
Run a docker image.
|
String |
whoAmI()
Who is executing this
DockerClient instance. |
getContainerRecord, getVolumes, inspect, inspectRequiredField, parseVersionNumber, rm, stop, versionpublic WindowsDockerClient(@Nonnull Launcher launcher, @CheckForNull Node node, @CheckForNull String toolName)
public String run(@Nonnull EnvVars launchEnv, @Nonnull String image, @CheckForNull String args, @CheckForNull String workdir, @Nonnull Map<String,String> volumes, @Nonnull Collection<String> volumesFromContainers, @Nonnull EnvVars containerEnv, @Nonnull String user, @Nonnull String... command) throws IOException, InterruptedException
DockerClientrun in class DockerClientlaunchEnv - Docker client launch environment.image - The image name.args - Any additional arguments for the docker run command.workdir - The working directory in the container, or null for default.volumes - Volumes to be bound. Supply an empty list if no volumes are to be bound.volumesFromContainers - Mounts all volumes from the given containers.containerEnv - Environment variables to set in container.user - The uid:gid to execute the container command as. Use DockerClient.whoAmI().command - The command to execute in the image container being run.IOExceptionInterruptedExceptionpublic List<String> listProcess(@Nonnull EnvVars launchEnv, @Nonnull String containerId) throws IOException, InterruptedException
listProcess in class DockerClientIOExceptionInterruptedExceptionpublic com.google.common.base.Optional<String> getContainerIdIfContainerized() throws IOException, InterruptedException
DockerClientDockerClient instance is running inside a container and returns the id of the container
if so.getContainerIdIfContainerized in class DockerClientIOExceptionInterruptedExceptionpublic String whoAmI() throws IOException, InterruptedException
DockerClientDockerClient instance.whoAmI in class DockerClientString containing the uid:gid.IOExceptionInterruptedExceptionCopyright © 2016–2019. All rights reserved.