View Source DockerEngineAPI.Api.Exec (testcontainers v1.11.6)
API calls for all endpoints tagged Exec
.
Summary
Functions
Create an exec instance Run a command inside a running container.
Inspect an exec instance Return low-level information about an exec instance.
Resize an exec instance
Resize the TTY session used by an exec instance. This endpoint only works if tty
was specified as part of creating and starting the exec instance.
Start an exec instance Starts a previously set up exec instance. If detach is true, this endpoint returns immediately after starting the command. Otherwise, it sets up an interactive session with the command.
Functions
@spec container_exec( Tesla.Env.client(), String.t(), DockerEngineAPI.Model.ExecConfig.t(), keyword() ) :: {:ok, DockerEngineAPI.Model.ErrorResponse.t()} | {:ok, DockerEngineAPI.Model.IdResponse.t()} | {:error, Tesla.Env.t()}
Create an exec instance Run a command inside a running container.
Parameters
connection
(DockerEngineAPI.Connection): Connection to serverid
(String.t): ID or name of containerexec_config
(ExecConfig): Exec configurationopts
(keyword): Optional parameters
Returns
{:ok, DockerEngineAPI.Model.IdResponse.t}
on success{:error, Tesla.Env.t}
on failure
@spec exec_inspect(Tesla.Env.client(), String.t(), keyword()) :: {:ok, DockerEngineAPI.Model.ErrorResponse.t()} | {:ok, DockerEngineAPI.Model.ExecInspectResponse.t()} | {:error, Tesla.Env.t()}
Inspect an exec instance Return low-level information about an exec instance.
Parameters
connection
(DockerEngineAPI.Connection): Connection to serverid
(String.t): Exec instance IDopts
(keyword): Optional parameters
Returns
{:ok, DockerEngineAPI.Model.ExecInspectResponse.t}
on success{:error, Tesla.Env.t}
on failure
@spec exec_resize(Tesla.Env.client(), String.t(), keyword()) :: {:ok, nil} | {:ok, DockerEngineAPI.Model.ErrorResponse.t()} | {:error, Tesla.Env.t()}
Resize an exec instance
Resize the TTY session used by an exec instance. This endpoint only works if tty
was specified as part of creating and starting the exec instance.
Parameters
connection
(DockerEngineAPI.Connection): Connection to serverid
(String.t): Exec instance IDopts
(keyword): Optional parameters:h
(integer()): Height of the TTY session in characters:w
(integer()): Width of the TTY session in characters
Returns
{:ok, nil}
on success{:error, Tesla.Env.t}
on failure
@spec exec_start(Tesla.Env.client(), String.t(), keyword()) :: {:ok, Tesla.Env.t() | DockerEngineAPI.Model.ErrorResponse.t()} | {:error, Tesla.Env.t()}
Start an exec instance Starts a previously set up exec instance. If detach is true, this endpoint returns immediately after starting the command. Otherwise, it sets up an interactive session with the command.
Parameters
connection
(DockerEngineAPI.Connection): Connection to serverid
(String.t): Exec instance IDopts
(keyword): Optional parameters:body
(ExecStartConfig):
Returns
{:ok, nil}
on success{:error, Tesla.Env.t}
on failure