Struct rust_docker::client::DockerClient[][src]

pub struct DockerClient { /* fields omitted */ }

A structure defining a Client to interact with the docker API

  • unix_socket: UnixStream connection for docker socket.
  • protocol: Underlying protocol we are using(UNIX by default.)

Methods

impl DockerClient
[src]

Creates a new DockerClient object connected to docker's unix domain socket.

Trait Implementations

impl Clone for DockerClient
[src]

Implement clone for the DockerClient structure. The clone here is not true clone, the unix_socket cloned still refers to the stream and change to one of the two will propogate the changes to other.

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl DockerApiClient for DockerClient
[src]

impl Version for DockerClient
[src]

Get version info for Docker Returns a JSON serialized string containing this information Read more

impl Containers for DockerClient
[src]

Just a helper function for the Containers DockerApiClient. It formats the API request using the given parameters, and using this request the docker daemon and sends back the response of the request if the request was successful else an err. Read more

Get Containers from the API endpoint with the method and query_param. Helper function for Container trait. Read more

List all the running containers Return an instance of Vector of container Read more

List all containers whether running or stopped.

List container with the filter provided, the filter can be looked from Docker engine official API documentation. https://docs.docker.com/engine/api/v1.37/#operation/ContainerList Read more

Create a container from the ContainerConfig structure with the provided name. The response for the request is the CreateContaierResponse struct which contains the ID for the container which we created. Read more

Creates/Spawn docker container from the configuration provided. It only Read more

Inspects the container with the provided ID Returns Low level information about the container. Read more

Gives the changes done to somewhere in the filesystem in the docker container as a list of files with the kind of changes. Read more

Function to manipulate container status It is a parent function for all the commands which result in a status change of the container. Read more

Auto Trait Implementations