Module Container.Exec

type t
val create : ?addr:Unix.sockaddr -> ?stdin:bool -> ?stdout:bool -> ?stderr:bool -> ?detach_keys:string -> ?env:string list -> ?privileged:bool -> ?user:string -> id -> string list -> t

exec id cmd sets up an exec instance in the running container id that executes cmd. The command cmd has the form [prog; arg1;...; argN]. It will not be restarted if the container is (restarted). If the container is paused, then the command will wait until the container is unpaused, and then run. The output of this command is not logged by the container. If the command does not exist, a message will be printed on the stderr component of the stream returned by start.

  • parameter stdin

    whether to attach stdin. Default: false.

  • parameter stdout

    whether to attach stdout. Default: true.

  • parameter stderr

    whether to attach stderr. Default: true.

  • parameter detach_keys

    Override the key sequence for detaching a container. Format is a single character [a-Z] or ctrl-<value> where <value> is one of: a-z, @, ^, [, , or _.

  • parameter env

    A list of environment variables of the form "VAR=value". A variable without = is removed from the environment, rather than to have an empty value.

  • parameter user

    The user, and optionally, group to run the exec process inside the container. Format is one of: user, user:group, uid, or uid:gid.

val start : ?addr:Unix.sockaddr -> t -> Stream.t

start exec_id starts a previously set up exec instance exec_id. Returns a stream that enable an interactive session with the command.