[][src]Struct docker_command::RunOpt

pub struct RunOpt {
    pub image: String,
    pub env: Vec<(OsString, OsString)>,
    pub detach: bool,
    pub init: bool,
    pub name: Option<String>,
    pub network: Option<String>,
    pub user: Option<User>,
    pub read_only: bool,
    pub remove: bool,
    pub volumes: Vec<Volume>,
    pub command: Option<PathBuf>,
    pub args: Vec<OsString>,
}

Options for running a container.

Fields

image: String

Container image to run.

env: Vec<(OsString, OsString)>

Set environment variables.

detach: bool

If true, run the container in the background and print container ID. Defaults to false.

init: bool

Run an init inside the container that forwards signals and reaps processes.

name: Option<String>

Optional name to give the container.

network: Option<String>

Connect a container to a network.

user: Option<User>

User (and optionally group) to use inside the container.

read_only: bool

Mount the container's root filesystem as read only.

remove: bool

If true, automatically remove the container when it exits. Defaults to false.

volumes: Vec<Volume>

Volumes to mount in the container.

command: Option<PathBuf>

Optional command to run.

args: Vec<OsString>

Optional arguments to pass to the command.

Trait Implementations

impl Clone for RunOpt[src]

impl Debug for RunOpt[src]

impl Default for RunOpt[src]

impl Eq for RunOpt[src]

impl PartialEq<RunOpt> for RunOpt[src]

impl StructuralEq for RunOpt[src]

impl StructuralPartialEq for RunOpt[src]

Auto Trait Implementations

impl RefUnwindSafe for RunOpt

impl Send for RunOpt

impl Sync for RunOpt

impl Unpin for RunOpt

impl UnwindSafe for RunOpt

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.