class

Docker::Container

Inherits Docker::ApiClientWrapper / Reference / Object

Interact with a single container that exists on a docker client.

Constructors

new(client : Docker::Api::ApiClient, id : String)

Create a new container interaction object for the passed container id.

Source

Create a new container interaction object based on a previous queried container model.

Source

Instance methods

attrs

Locally cached container attributes.

This is populated at the time of object creation. Use '#reload!' to update.

Source
id

The ID of the container object.

Source
image

The image ID of the container.

Source
kill(signal = nil)

Kill or send a signal to the container.

Source
labels

The labels of a container.

Source
name

The name of the container.

Source
pause

Pauses all processes within this container.

Source
reload!

Load this object from the server again and update attrs with the new data.

Source
rename(name : String)

Rename this container.

Similar to the docker rename command.

Source
restart(timeout = nil)

Restart this container.

Similar to the docker restart command.

Source
short_id

The ID of the object, truncated to 10 characters.

Source
start

Start this container.

Source
status

The status of the container. For example, "running", or "exited".

Source
stop(timeout = nil)

Stop this container.

Source
unpause

Unpause all processes within the container.

Source
update

Update resource configuration of the containers.

Source
wait(condition = nil)

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

Source