[][src]Struct docker_command::Docker

pub struct Docker {
    pub sudo: bool,
    pub program: PathBuf,
}

Base container command used for building and running containers.

This allows variations such as "docker", "sudo docker", and "podman".

Fields

sudo: bool

If true, run the command with sudo. Defaults to false.

program: PathBuf

The container command. The default is "docker", but can be changed to another compatible program such as "podman".

Implementations

impl Docker[src]

pub fn new() -> Self[src]

Create a new Docker instance with the default values set.

pub fn command(&self) -> Command[src]

Create the base Command for running Docker.

pub fn build(&self, opt: BuildOpt) -> Command[src]

Create a Command for building a container.

pub fn create_network(&self, opt: CreateNetworkOpt) -> Command[src]

Create a Command for creating a network.

pub fn remove_network(&self, name: &str) -> Command[src]

Create a Command for removing a network.

pub fn run(&self, opt: RunOpt) -> Command[src]

Create a Command for running a container.

Trait Implementations

impl Clone for Docker[src]

impl Debug for Docker[src]

impl Default for Docker[src]

impl Eq for Docker[src]

impl PartialEq<Docker> for Docker[src]

impl StructuralEq for Docker[src]

impl StructuralPartialEq 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, 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.