pub struct Container<'a, 'b> { /* private fields */ }
Expand description
Interface for accessing and manipulating a docker container
Implementations§
source§impl<'a, 'b> Container<'a, 'b>
impl<'a, 'b> Container<'a, 'b>
sourcepub fn new<S>(docker: &'a Docker, id: S) -> Container<'a, 'b>where
S: Into<Cow<'b, str>>,
pub fn new<S>(docker: &'a Docker, id: S) -> Container<'a, 'b>where
S: Into<Cow<'b, str>>,
Exports an interface exposing operations against a container instance
sourcepub fn inspect(&self) -> impl Future<Item = ContainerDetails, Error = Error>
pub fn inspect(&self) -> impl Future<Item = ContainerDetails, Error = Error>
Inspects the current docker container instance’s details
sourcepub fn top(&self, psargs: Option<&str>) -> impl Future<Item = Top, Error = Error>
pub fn top(&self, psargs: Option<&str>) -> impl Future<Item = Top, Error = Error>
Returns a top
view of information about the container process
sourcepub fn logs(
&self,
opts: &LogsOptions
) -> impl Stream<Item = Chunk, Error = Error>
pub fn logs(
&self,
opts: &LogsOptions
) -> impl Stream<Item = Chunk, Error = Error>
Returns a stream of logs emitted but the container instance
sourcepub fn attach(&self) -> impl Future<Item = Multiplexed, Error = Error>
pub fn attach(&self) -> impl Future<Item = Multiplexed, Error = Error>
Attaches to a running container, returning a stream that can be used to interact with the standard IO streams.
sourcepub fn attach_blocking(&self) -> Result<MultiplexedBlocking>
pub fn attach_blocking(&self) -> Result<MultiplexedBlocking>
Attaches to a running container, returning a stream that can be used to interact with the standard IO streams.
sourcepub fn changes(&self) -> impl Future<Item = Vec<Change>, Error = Error>
pub fn changes(&self) -> impl Future<Item = Vec<Change>, Error = Error>
Returns a set of changes made to the container instance
sourcepub fn export(&self) -> impl Stream<Item = Vec<u8>, Error = Error>
pub fn export(&self) -> impl Stream<Item = Vec<u8>, Error = Error>
Exports the current docker container into a tarball
sourcepub fn stats(&self) -> impl Stream<Item = Stats, Error = Error>
pub fn stats(&self) -> impl Stream<Item = Stats, Error = Error>
Returns a stream of stats specific to this container instance
sourcepub fn stop(
&self,
wait: Option<Duration>
) -> impl Future<Item = (), Error = Error>
pub fn stop(
&self,
wait: Option<Duration>
) -> impl Future<Item = (), Error = Error>
Stop the container instance
sourcepub fn restart(
&self,
wait: Option<Duration>
) -> impl Future<Item = (), Error = Error>
pub fn restart(
&self,
wait: Option<Duration>
) -> impl Future<Item = (), Error = Error>
Restart the container instance
sourcepub fn kill(&self, signal: Option<&str>) -> impl Future<Item = (), Error = Error>
pub fn kill(&self, signal: Option<&str>) -> impl Future<Item = (), Error = Error>
Kill the container instance
sourcepub fn rename(&self, name: &str) -> impl Future<Item = (), Error = Error>
pub fn rename(&self, name: &str) -> impl Future<Item = (), Error = Error>
Rename the container instance
sourcepub fn delete(&self) -> impl Future<Item = (), Error = Error>
pub fn delete(&self) -> impl Future<Item = (), Error = Error>
Delete the container instance
Use remove instead to use the force/v options.