pub struct RunOpt {Show 15 fields
pub image: String,
pub env: Vec<(OsString, OsString)>,
pub detach: bool,
pub init: bool,
pub interactive: bool,
pub name: Option<String>,
pub network: Option<String>,
pub user: Option<UserAndGroup>,
pub publish: Vec<PublishPorts>,
pub read_only: bool,
pub remove: bool,
pub tty: 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.
interactive: bool
Keep stdin open even if not attached.
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.
publish: Vec<PublishPorts>
Publish ports from the container to the host.
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
.
tty: bool
Allocate a psuedo-TTY.
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 Eq for RunOpt
impl StructuralPartialEq for RunOpt
Auto Trait Implementations§
impl Freeze for RunOpt
impl RefUnwindSafe for RunOpt
impl Send for RunOpt
impl Sync for RunOpt
impl Unpin for RunOpt
impl UnwindSafe for RunOpt
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more