Struct dockworker::Docker [−][src]
pub struct Docker { /* fields omitted */ }
Client connects to docker daemon
Methods
impl Docker
[src]
impl Docker
pub fn connect_with_defaults() -> Result<Docker>
[src]
pub fn connect_with_defaults() -> Result<Docker>
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.
pub fn connect_with_unix(addr: &str) -> Result<Docker>
[src]
pub fn connect_with_unix(addr: &str) -> Result<Docker>
pub fn connect_with_ssl(
_addr: &str,
_key: &Path,
_cert: &Path,
_ca: &Path
) -> Result<Docker>
[src]
pub fn connect_with_ssl(
_addr: &str,
_key: &Path,
_cert: &Path,
_ca: &Path
) -> Result<Docker>
pub fn connect_with_http(addr: &str) -> Result<Docker>
[src]
pub fn connect_with_http(addr: &str) -> Result<Docker>
Connect using unsecured HTTP. This is strongly discouraged everywhere but on Windows when npipe support is not available.
pub fn list_containers(
&self,
all: Option<bool>,
limit: Option<u64>,
size: Option<bool>,
filters: ContainerFilters
) -> Result<Vec<Container>>
[src]
pub fn list_containers(
&self,
all: Option<bool>,
limit: Option<u64>,
size: Option<bool>,
filters: ContainerFilters
) -> Result<Vec<Container>>
pub fn containers(&self, opts: ContainerListOptions) -> Result<Vec<Container>>
[src]
pub fn containers(&self, opts: ContainerListOptions) -> Result<Vec<Container>>
pub fn create_container(
&self,
name: Option<&str>,
option: &ContainerCreateOptions
) -> Result<CreateContainerResponse>
[src]
pub fn create_container(
&self,
name: Option<&str>,
option: &ContainerCreateOptions
) -> Result<CreateContainerResponse>
Create a container
Summary
name
- None: auto namingoption
- create options
API
POST /containers/create?{name}
pub fn start_container(&self, id: &str) -> Result<()>
[src]
pub fn start_container(&self, id: &str) -> Result<()>
pub fn stop_container(&self, id: &str, timeout: Duration) -> Result<()>
[src]
pub fn stop_container(&self, id: &str, timeout: Duration) -> Result<()>
pub fn kill_container(&self, id: &str, signal: Signal) -> Result<()>
[src]
pub fn kill_container(&self, id: &str, signal: Signal) -> Result<()>
pub fn attach_container(
&self,
id: &str,
detachKeys: Option<&str>,
logs: bool,
stream: bool,
stdin: bool,
stdout: bool,
stderr: bool
) -> Result<AttachResponseStream>
[src]
pub fn attach_container(
&self,
id: &str,
detachKeys: Option<&str>,
logs: bool,
stream: bool,
stdin: bool,
stdout: bool,
stderr: bool
) -> Result<AttachResponseStream>
Attach to a container
Attach to a container to read its output or send it input.
API
/containers/{id}/attach
pub fn container_top(&self, container: &Container) -> Result<Top>
[src]
pub fn container_top(&self, container: &Container) -> Result<Top>
pub fn processes(&self, container: &Container) -> Result<Vec<Process>>
[src]
pub fn processes(&self, container: &Container) -> Result<Vec<Process>>
pub fn stats(&self, container: &Container) -> Result<StatsReader>
[src]
pub fn stats(&self, container: &Container) -> Result<StatsReader>
pub fn wait_container(&self, id: &str) -> Result<ExitStatus>
[src]
pub fn wait_container(&self, id: &str) -> Result<ExitStatus>
pub fn remove_container(
&self,
id: &str,
volume: Option<bool>,
force: Option<bool>,
link: Option<bool>
) -> Result<()>
[src]
pub fn remove_container(
&self,
id: &str,
volume: Option<bool>,
force: Option<bool>,
link: Option<bool>
) -> Result<()>
pub fn create_image(
&self,
image: &str,
tag: &str
) -> Result<Box<Iterator<Item = Result<Value>>>>
[src]
pub fn create_image(
&self,
image: &str,
tag: &str
) -> Result<Box<Iterator<Item = Result<Value>>>>
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
pub fn remove_image(
&self,
name: &str,
force: Option<bool>,
noprune: Option<bool>
) -> Result<Vec<RemoveImageResponse>>
[src]
pub fn remove_image(
&self,
name: &str,
force: Option<bool>,
noprune: Option<bool>
) -> Result<Vec<RemoveImageResponse>>
pub fn images(&self, all: bool) -> Result<Vec<Image>>
[src]
pub fn images(&self, all: bool) -> Result<Vec<Image>>
pub fn export_image(&self, name: &str) -> Result<Box<Read>>
[src]
pub fn export_image(&self, name: &str) -> Result<Box<Read>>
pub fn load_image(&self, quiet: bool, path: &Path) -> Result<ImageId>
[src]
pub fn load_image(&self, quiet: bool, path: &Path) -> Result<ImageId>
pub fn system_info(&self) -> Result<SystemInfo>
[src]
pub fn system_info(&self) -> Result<SystemInfo>
pub fn container_info(&self, container: &Container) -> Result<ContainerInfo>
[src]
pub fn container_info(&self, container: &Container) -> Result<ContainerInfo>
pub fn filesystem_changes(
&self,
container: &Container
) -> Result<Vec<FilesystemChange>>
[src]
pub fn filesystem_changes(
&self,
container: &Container
) -> Result<Vec<FilesystemChange>>
pub fn export_container(&self, container: &Container) -> Result<Box<Read>>
[src]
pub fn export_container(&self, container: &Container) -> Result<Box<Read>>
pub fn ping(&self) -> Result<()>
[src]
pub fn ping(&self) -> Result<()>
pub fn version(&self) -> Result<Version>
[src]
pub fn version(&self) -> Result<Version>