module

Docker::Api::Containers

API queries for container interaction.

Instance methods

containers(all : Bool | Nil = nil, limit : Int | Nil = nil, size : Bool | Nil = nil, filters : Hash | Nil = nil)

List containers.

Similar to the docker ps command.

Source
create_container(name : String | Nil = nil, **props)

Creates a container.

Parameters are similar to those for the docker run command.

Source
inspect_container(id : String)

Query container info.

Identical to the docker inspect command, but only for containers.

Source
kill(id : String, signal : String | Nil = nil)

Send a POSIX signal to a container, defaulting to killing to the container.

Similar to the docker kill command.

Source
pause(id : String)

Pauses all processes within a container.

Similar to docker pause command.

Source
rename(id : String, name : String)

Rename a container.

Similar to the docker rename command.

Source
restart(id : String, timeout : Int | Nil = nil)

Restart a container.

Similar to the docker restart command.

Source
start(id : String)

Start a container.

Similar to the docker start command, but doesn’t support attach options.

Source
stop(id : String, timeout : Int | Nil = nil)

Stops a container.

Similar to the docker stop command.

Source
unpause(id : String)

Resume a container which has been paused.

Similar to docker unpause command.

Source
update(id : String, **props)

Change various configuration options of a container without having to recreate it.

Similar to docker update command.

Source
wait(id : String, condition : String | Nil = nil)

Block until a container stops, then returns the exit code.

Similar to docker wait command.

Source