Struct docker_command::RunOpt [−][src]
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<UserAndGroup>,
pub read_only: bool,
pub remove: bool,
pub volumes: Vec<Volume>,
pub command: Option<PathBuf>,
pub args: Vec<OsString>,
}
Expand description
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<UserAndGroup>
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
Auto Trait Implementations
impl RefUnwindSafe for RunOpt
impl UnwindSafe for RunOpt
Blanket Implementations
Mutably borrows from an owned value. Read more