Struct moby::docker::Docker[][src]

pub struct Docker { /* fields omitted */ }

Entrypoint interface for communicating with docker daemon

Implementations

impl Docker[src]

pub fn new<S>(uri: S) -> Result<Docker> where
    S: AsRef<str>, 
[src]

Creates a new Docker instance by automatically choosing appropriate connection type based on provided uri.

Supported schemes are:

  • unix:// with feature unix-socket enabled, otherwise returns an Error
  • tcp://
  • http://

To create a Docker instance utilizing TLS use explicit Docker::tls constructor.

pub fn unix<S>(socket_path: S) -> Docker where
    S: Into<String>, 
[src]

Creates a new docker instance for a docker host listening on a given Unix socket.

socket_path is the part of URI that comes after the unix://. For example a URI unix:///run/docker.sock has a socket_path == “/run/docker.sock”.

pub fn tls<S, P>(host: S, cert_path: P, verify: bool) -> Result<Docker> where
    S: Into<String>,
    P: AsRef<Path>, 
[src]

Creates a new docker instance for a docker host listening on a given TCP socket host. host is the part of URI that comes after tcp:// or http:// or https:// schemes, also known as authority part.

cert_path specifies the base path in the filesystem containing a certificate (cert.pem) and a key (key.pem) that will be used by the client. If verify is true a CA file will be added (ca.pem) to the connector.

pub fn tcp<S>(host: S) -> Docker where
    S: Into<String>, 
[src]

Creates a new docker instance for a docker host listening on a given TCP socket host. host is the part of URI that comes after tcp:// or http:// schemes, also known as authority part.

TLS is supported with feature tls enabled through Docker::tls constructor.

pub fn images(&self) -> Images<'_>[src]

Exports an interface for interacting with docker images

pub fn containers(&self) -> Containers<'_>[src]

Exports an interface for interacting with docker containers

pub fn services(&self) -> Services<'_>[src]

Exports an interface for interacting with docker services

pub fn networks(&self) -> Networks<'_>[src]

pub fn volumes(&self) -> Volumes<'_>[src]

pub async fn version(&self) -> Result<Version>[src]

Returns version information associated with the docker daemon

pub async fn info(&self) -> Result<Info>[src]

Returns information associated with the docker daemon

pub async fn ping(&self) -> Result<String>[src]

Returns a simple ping response indicating the docker daemon is accessible

pub fn events<'docker>(
    &'docker self,
    opts: &EventsOptions
) -> impl Stream<Item = Result<Event>> + Unpin + 'docker
[src]

Returns a stream of docker events

Trait Implementations

impl Clone for Docker[src]

impl Debug for Docker[src]

Auto Trait Implementations

impl !RefUnwindSafe for Docker

impl Send for Docker

impl Sync for Docker

impl Unpin for Docker

impl !UnwindSafe for Docker

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.