class

Docr::Containers

Inherits Reference / Object

Constructors

new(client : Client)
Source

Instance methods

create(name : String, config : Types::ContainerConfig) : Types::CreateContainerResponse

Create a new container with the given name and configuration.

Source
delete(id : String, force : Bool = false)

Remove a container.

Source
kill(id : String, signal : String = "SIGKILL")

Send a signal to a container.

Source
list(filters : Hash(String, Array(String)) | Nil = nil) : Array(Types::ContainerSummary)

List containers, optionally filtered.

Source
logs(id : String, output : IO, follow : Bool = false, stdout : Bool = true, stderr : Bool = true)

Stream container logs, writing decoded output to the given IO. Handles the Docker multiplexed stream format (8-byte header per frame).

Source
start(id : String)

Start a created container.

Source
wait(id : String) : Types::WaitResponse

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

Source