class Companion::Docker::Client::Local
- Companion::Docker::Client::Local
- Reference
- Object
Included Modules
Defined in:
docker/client/client.crConstructors
Instance Method Summary
-
#connect_network(options : ConnectNetworkOptions) : Nil
Connect a container to a network
-
#containers(all = false) : Array(Container)
Lists containers.
-
#create_container(options : CreateContainerOptions, name : String | Nil = nil) : CreateContainerResponse
Creates a new container and return its id.
-
#create_image(from_image : String, tag : String, &)
Create an image and returns its id
-
#create_network(options : CreateNetworkOptions) : CreateNetworkResponse
Creates a network.
-
#get_container_id(name : String) : String | Nil
Get a container's id.
-
#get_logs(id : String, stdout : Bool, stderr : Bool, lines : Int32) : String
Get a container's logs
-
#images : Array(Image)
Get images.
- #networks : Array(Network)
-
#pull_image(name, tag = "latest", &block : CreateImageResponse -> )
Pulls an image from dockerhub
-
#remove_container(id : String) : Nil
Removes a containers.
-
#start_container(id : String) : Nil
Starts a container.
Instance methods inherited from module Companion::Docker::Client
create_container(options : CreateContainerOptions, name : String) : CreateContainerResponse
create_container,
create_network(options : CreateNetworkOptions) : CreateNetworkResponse
create_network,
get_container_id(name : String) : String | Nil
get_container_id,
get_logs(id : String, stdout : Bool, stderr : Bool, lines : Int32) : String
get_logs,
images : Array(Image)
images,
pull_image(name, &block : CreateImageResponse -> )
pull_image,
start_container(id : String) : Nil
start_container
Constructor Detail
Instance Method Detail
Lists containers.
By default list only running ones. Set all to true
to get all containers.
def create_container(options : CreateContainerOptions, name : String | Nil = nil) : CreateContainerResponse
#
Creates a new container and return its id.
Description copied from module Companion::Docker::Client
Creates a network.
def get_container_id(name : String) : String | Nil
#
Description copied from module Companion::Docker::Client
Get a container's id.
Returns nil if the container is not found.
def get_logs(id : String, stdout : Bool, stderr : Bool, lines : Int32) : String
#
Description copied from module Companion::Docker::Client
Get a container's logs
Description copied from module Companion::Docker::Client
Get images.
Pulls an image from dockerhub
def remove_container(id : String) : Nil
#
Removes a containers.
If the container is running, it will be killed.