class Docker::Container
- Docker::Container
- Reference
- Object
Overview
Interact with a single container that exists on a docker client.
Included Modules
Defined in:
docker/container.crConstructors
-
.new(client : Docker::Api::ApiClient, id : String)
Create a new container interaction object for the passed container id.
-
.new(client : Docker::Api::ApiClient, attrs : Docker::Api::Models::Container)
Create a new container interaction object based on a previous queried container model.
Instance Method Summary
-
#attrs : Docker::Api::Models::Container
Locally cached container attributes.
-
#id
The ID of the container object.
-
#image
The image ID of the container.
-
#kill(signal = nil)
Kill or send a signal to the container.
-
#labels
The labels of a container.
-
#name
The name of the container.
-
#pause
Pauses all processes within this container.
-
#reload!
Load this object from the server again and update attrs with the new data.
-
#remove(v = nil, force = nil, link = nil)
Remove this container.
-
#rename(name : String)
Rename this container.
-
#restart(timeout = nil)
Restart this container.
-
#short_id
The ID of the object, truncated to 10 characters.
-
#start
Start this container.
-
#status
The status of the container.
-
#stop(timeout = nil)
Stop this container.
-
#unpause
Unpause all processes within the container.
-
#update(**props)
Update resource configuration of the containers.
-
#wait(condition = nil)
Block until the container stops, then return its exit code.
Constructor methods inherited from module Docker::ApiClientWrapper
new(client)
new
Constructor Detail
Create a new container interaction object for the passed container id.
Create a new container interaction object based on a previous queried container model.
Instance Method Detail
Locally cached container attributes.
This is populated at the time of object creation. Use '#reload!' to update.
Remove this container.
Similar to the docker rm
command.