Struct dockworker::Docker[][src]

pub struct Docker { /* fields omitted */ }

Client connects to docker daemon

Methods

impl Docker
[src]

Connect to the Docker daemon using the standard Docker configuration options. This includes DOCKER_HOST, DOCKER_TLS_VERIFY, DOCKER_CERT_PATH and DOCKER_CONFIG, and we try to interpret these as much like the standard docker client as possible.

Connect using unsecured HTTP. This is strongly discouraged everywhere but on Windows when npipe support is not available.

List containers

API

/containers/json

Deprecated

Create a container

Summary

  • name - None: auto naming
  • option - create options

API

POST /containers/create?{name}

Start a container

API

/containers/{id}/start

Stop a container

API

/containers/{id}/stop

Kill a container

API

/containers/{id}/kill

Attach to a container

Attach to a container to read its output or send it input.

API

/containers/{id}/attach

List processes running inside a container

API

/containers/{id}/top

Get containers stats based resource usage

API

/containers/{id}/stats

Wait for a container

API

/containers/{id}/wait

Remove a container

API

/containers/{id}

Create an image by pulling it from registry

API

/images/create?fromImage={image}&tag={tag}

NOTE

When control returns from this function, creating job may not have been completed. For waiting the completion of the job, cunsuming response like create_image("hello-world", "linux").map(|r| r.for_each(|_| ()));.

TODO

  • Typing result iterator like image::ImageStatus.
  • Generalize input parameters

Remove an image

API

/images/{name}

List images

API

/images/json

Get a tarball containing all images and metadata for a repository

API

/images/{name}/get

Import images

Summary

Load a set of images and tags into a repository

API

/images/load

Get system information

API

/info

Inspect about a container

API

/containers/{id}/json

Get changes on a container's filesystem

API

/containers/{id}/changes

Export a container

Summary

Returns a pointer to tar archive stream.

API

/containers/{id}/export

Test if the server is accessible

API

/_ping

Get version and various information

API

/version

Trait Implementations

impl Debug for Docker
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl Send for Docker

impl !Sync for Docker