Interact with a single container that exists on a docker client.
Constructors
Create a new container interaction object for the passed container id.
SourceCreate a new container interaction object based on a previous queried container model.
SourceInstance methods
attrs
Locally cached container attributes.
This is populated at the time of object creation. Use '#reload!' to update.
Sourceid
The ID of the container object.
Sourceimage
The image ID of the container.
Sourcekill(signal = nil)
Kill or send a signal to the container.
Sourcelabels
The labels of a container.
Sourcename
The name of the container.
Sourcepause
Pauses all processes within this container.
Sourcereload!
Load this object from the server again and update attrs with the new data.
Sourceremove(v = nil, force = nil, link = nil)
Remove this container.
Similar to the docker rm command.
SourceRename this container.
Similar to the docker rename command.
Sourcerestart(timeout = nil)
Restart this container.
Similar to the docker restart command.
Sourceshort_id
The ID of the object, truncated to 10 characters.
Sourcestatus
The status of the container. For example, "running", or "exited".
Sourceunpause
Unpause all processes within the container.
Sourceupdate
Update resource configuration of the containers.
Sourcewait(condition = nil)
Block until the container stops, then return its exit code.
Source