class Docr::Containers

Defined in:

docr/containers.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(client : Client) #

[View source]

Instance Method Detail

def create(name : String, config : ContainerConfig) : CreateContainerResponse #

Create a new container with the given name and configuration.


[View source]
def delete(id : String, force : Bool = false) #

Remove a container.


[View source]
def kill(id : String, signal : String = "SIGKILL") #

Send a signal to a container.


[View source]
def list(filters : Hash(String, Array(String)) | Nil = nil) : Array(ContainerSummary) #

List containers, optionally filtered.


[View source]
def 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).


[View source]
def start(id : String) #

Start a created container.


[View source]
def wait(id : String) : WaitResponse #

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


[View source]