public final class ExecInContainerPattern
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static Container.ExecResult |
execInContainer(com.github.dockerjava.api.DockerClient dockerClient,
com.github.dockerjava.api.command.InspectContainerResponse containerInfo,
java.nio.charset.Charset outputCharset,
java.lang.String... command)
Run a command inside a running container, as though using "docker exec".
|
static Container.ExecResult |
execInContainer(com.github.dockerjava.api.DockerClient dockerClient,
com.github.dockerjava.api.command.InspectContainerResponse containerInfo,
java.lang.String... command)
Run a command inside a running container, as though using "docker exec", and interpreting
the output as UTF8.
|
static Container.ExecResult |
execInContainer(com.github.dockerjava.api.command.InspectContainerResponse containerInfo,
java.nio.charset.Charset outputCharset,
java.lang.String... command)
|
static Container.ExecResult |
execInContainer(com.github.dockerjava.api.command.InspectContainerResponse containerInfo,
java.lang.String... command)
|
@Deprecated public static Container.ExecResult execInContainer(com.github.dockerjava.api.command.InspectContainerResponse containerInfo, java.lang.String... command) throws java.lang.UnsupportedOperationException, java.io.IOException, java.lang.InterruptedException
java.lang.UnsupportedOperationExceptionjava.io.IOExceptionjava.lang.InterruptedException@Deprecated public static Container.ExecResult execInContainer(com.github.dockerjava.api.command.InspectContainerResponse containerInfo, java.nio.charset.Charset outputCharset, java.lang.String... command) throws java.lang.UnsupportedOperationException, java.io.IOException, java.lang.InterruptedException
java.lang.UnsupportedOperationExceptionjava.io.IOExceptionjava.lang.InterruptedExceptionpublic static Container.ExecResult execInContainer(com.github.dockerjava.api.DockerClient dockerClient, com.github.dockerjava.api.command.InspectContainerResponse containerInfo, java.lang.String... command) throws java.lang.UnsupportedOperationException, java.io.IOException, java.lang.InterruptedException
dockerClient - the DockerClientcontainerInfo - the container infocommand - the command to executejava.lang.UnsupportedOperationExceptionjava.io.IOExceptionjava.lang.InterruptedExceptionexecInContainer(DockerClient, InspectContainerResponse, Charset, String...)public static Container.ExecResult execInContainer(com.github.dockerjava.api.DockerClient dockerClient, com.github.dockerjava.api.command.InspectContainerResponse containerInfo, java.nio.charset.Charset outputCharset, java.lang.String... command) throws java.lang.UnsupportedOperationException, java.io.IOException, java.lang.InterruptedException
This functionality is not available on a docker daemon running the older "lxc" execution driver. At the time of writing, CircleCI was using this driver.
dockerClient - the DockerClientcontainerInfo - the container infooutputCharset - the character set used to interpret the output.command - the parts of the command to runjava.io.IOException - if there's an issue communicating with Dockerjava.lang.InterruptedException - if the thread waiting for the response is interruptedjava.lang.UnsupportedOperationException - if the docker daemon you're connecting to doesn't support "exec".