Class WindowsDockerClient
java.lang.Object
org.jenkinsci.plugins.docker.workflow.client.DockerClient
org.jenkinsci.plugins.docker.workflow.client.WindowsDockerClient
-
Field Summary
Fields inherited from class org.jenkinsci.plugins.docker.workflow.client.DockerClient
CLIENT_TIMEOUT, DOCKER_DATE_TIME_FORMAT, SKIP_RM_ON_STOP
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncom.google.common.base.Optional<String>
Checks if thisDockerClient
instance is running inside a container and returns the id of the container if so.listProcess
(EnvVars launchEnv, String containerId) 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.whoAmI()
Who is executing thisDockerClient
instance.Methods inherited from class org.jenkinsci.plugins.docker.workflow.client.DockerClient
getContainerRecord, getVolumes, inspect, inspectRequiredField, parseVersionNumber, rm, stop, version
-
Constructor Details
-
WindowsDockerClient
-
-
Method Details
-
run
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, InterruptedExceptionDescription copied from class:DockerClient
Run a docker image.- Overrides:
run
in classDockerClient
- Parameters:
launchEnv
- Docker client launch environment.image
- The image name.args
- Any additional arguments for thedocker run
command.workdir
- The working directory in the container, ornull
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. UseDockerClient.whoAmI()
.command
- The command to execute in the image container being run.- Returns:
- The container ID.
- Throws:
IOException
InterruptedException
-
listProcess
public List<String> listProcess(@NonNull EnvVars launchEnv, @NonNull String containerId) throws IOException, InterruptedException - Overrides:
listProcess
in classDockerClient
- Throws:
IOException
InterruptedException
-
getContainerIdIfContainerized
public com.google.common.base.Optional<String> getContainerIdIfContainerized() throws IOException, InterruptedExceptionDescription copied from class:DockerClient
Checks if thisDockerClient
instance is running inside a container and returns the id of the container if so.- Overrides:
getContainerIdIfContainerized
in classDockerClient
- Returns:
- an optional string containing the container id, or absent if it isn't containerized.
- Throws:
IOException
InterruptedException
- See Also:
-
whoAmI
Description copied from class:DockerClient
Who is executing thisDockerClient
instance.- Overrides:
whoAmI
in classDockerClient
- Returns:
- a
String
containing the uid:gid. - Throws:
IOException
InterruptedException
-