package docker-api
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=7c759b3d0f237df09e0d2be0e0f1c0586bb840f702353236ce18f8b99c85ed75
md5=6745c33bddc7437d8bd725b91e783b93
doc/docker/Docker/Container/index.html
Module Docker.Container
type t = {id : id;(*Identifier of the container.
*)names : string list;(*Names given to the container.
*)image : string;(*Name of the image used to create the container.
*)command : string;(*Command passed to the container.
*)created : float;(*Unix time of creation.
*)status : string;(*Human readable status.
*)ports : port list;size_rw : int;size_root_fs : int;
}type bind = | Vol of string(*create a new volume for the container
*)| Mount of string * string(*
*)Mount(host_path, container_path)bind-mount a host path into the container. A relativehost_pathwill be interpreted as relative to the current working directory (at the time of the function calling this binding).| Mount_ro of string * string(*As
*)Mountbut make the bind-mount read-only inside the container.
val list :
?addr:Unix.sockaddr ->
?all:bool ->
?limit:int ->
?since:id ->
?before:id ->
?size:bool ->
unit ->
t listlist () lists running containers (or all containers if ~all is set to true).
val create :
?addr:Unix.sockaddr ->
?hostname:string ->
?domainname:string ->
?user:string ->
?memory:int ->
?memory_swap:int ->
?stdin:bool ->
?stdout:bool ->
?stderr:bool ->
?open_stdin:bool ->
?stdin_once:bool ->
?env:string list ->
?workingdir:string ->
?networking:bool ->
?binds:bind list ->
?name:string ->
string ->
string list ->
idcreate image cmd create a container and returns its ID where image is the image name to use for the container and cmd the command to run. cmd has the form [prog; arg1;...; argN]. BEWARE that the output of cmd (on stdout and stderr) will be logged by the container (see logs) so it will consume disk space.
changes conn id Inspect changes on container id's filesystem.
export conn id export the contents of container id.
val start : ?addr:Unix.sockaddr -> ?binds:bind list -> id -> unitstart id starts the container id. BEWARE that the optinal arguments set here override the corresponding ones of create.
val stop : ?addr:Unix.sockaddr -> ?wait:int -> id -> unitstop id stops the container id.
val restart : ?addr:Unix.sockaddr -> ?wait:int -> id -> unitrestart id restart the container id.
val kill : ?addr:Unix.sockaddr -> ?signal:int -> id -> unitkill id kill the container id.
val pause : ?addr:Unix.sockaddr -> id -> unitpause id pause the container id.
val unpause : ?addr:Unix.sockaddr -> id -> unitunpause id unpause the container id.
val attach :
?addr:Unix.sockaddr ->
?logs:bool ->
?stream:bool ->
?stdin:bool ->
?stdout:bool ->
?stderr:bool ->
id ->
Stream.tattach id view or interact with any running container id primary process (pid 1).
val rm : ?addr:Unix.sockaddr -> ?volumes:bool -> ?force:bool -> id -> unitrm id remove the container id from the filesystem.
module Exec : sig ... end