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,
ExecConfig execConfig)
Run a command inside a running container as a given user, as using "docker exec -u user".
|
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", and interpreting
the output as UTF8.
|
static Container.ExecResult |
execInContainer(com.github.dockerjava.api.DockerClient dockerClient,
com.github.dockerjava.api.command.InspectContainerResponse containerInfo,
ExecConfig execConfig)
Run a command inside a running container as a given user, as using "docker exec -u user".
|
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)
|
static Container.ExecResult |
execInContainerWithUser(com.github.dockerjava.api.DockerClient dockerClient,
com.github.dockerjava.api.command.InspectContainerResponse containerInfo,
java.nio.charset.Charset outputCharset,
java.lang.String user,
java.lang.String... command)
|
static Container.ExecResult |
execInContainerWithUser(com.github.dockerjava.api.DockerClient dockerClient,
com.github.dockerjava.api.command.InspectContainerResponse containerInfo,
java.lang.String user,
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.UnsupportedOperationException
java.io.IOException
java.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.UnsupportedOperationException
java.io.IOException
java.lang.InterruptedException
public 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 DockerClient
containerInfo
- the container infocommand
- the command to executejava.lang.UnsupportedOperationException
java.io.IOException
java.lang.InterruptedException
execInContainerWithUser(DockerClient, InspectContainerResponse, String, 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
dockerClient
- the DockerClient
containerInfo
- the container infooutputCharset
- the character set used to interpret the output.command
- the command to executejava.lang.UnsupportedOperationException
java.io.IOException
java.lang.InterruptedException
execInContainerWithUser(DockerClient, InspectContainerResponse, Charset, String, String...)
@Deprecated public static Container.ExecResult execInContainerWithUser(com.github.dockerjava.api.DockerClient dockerClient, com.github.dockerjava.api.command.InspectContainerResponse containerInfo, java.lang.String user, 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 DockerClient
containerInfo
- the container infouser
- the user to run the command with, optionalcommand
- the command to executejava.lang.UnsupportedOperationException
java.io.IOException
java.lang.InterruptedException
execInContainerWithUser(DockerClient, InspectContainerResponse, Charset, String,
String...)
@Deprecated public static Container.ExecResult execInContainerWithUser(com.github.dockerjava.api.DockerClient dockerClient, com.github.dockerjava.api.command.InspectContainerResponse containerInfo, java.nio.charset.Charset outputCharset, java.lang.String user, 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 DockerClient
containerInfo
- the container infooutputCharset
- the character set used to interpret the output.user
- the user to run the command with, optionalcommand
- 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".public static Container.ExecResult execInContainer(com.github.dockerjava.api.DockerClient dockerClient, com.github.dockerjava.api.command.InspectContainerResponse containerInfo, ExecConfig execConfig) 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 DockerClient
containerInfo
- the container infoexecConfig
- the exec configurationjava.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".public static Container.ExecResult execInContainer(com.github.dockerjava.api.DockerClient dockerClient, com.github.dockerjava.api.command.InspectContainerResponse containerInfo, java.nio.charset.Charset outputCharset, ExecConfig execConfig) 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 DockerClient
containerInfo
- the container infooutputCharset
- the character set used to interpret the output.execConfig
- the exec configurationjava.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".