Skip to content

Commit

Permalink
create: Add no_pivot option
Browse files Browse the repository at this point in the history
The --no-pivot option is documented in
https://github.com/opencontainers/runc/blob/main/man/runc-create.8.md

Signed-off-by: Christophe de Dinechin <[email protected]>
  • Loading branch information
c3d committed Mar 3, 2023
1 parent eea81cd commit c471c95
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion crates/liboci-cli/src/create.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ use clap::Parser;
use std::path::PathBuf;

/// Create a container
/// Reference: https://github.com/opencontainers/runc/blob/main/man/runc-create.8.md
#[derive(Parser, Debug)]
pub struct Create {
/// File to write pid of the container created
Expand All @@ -18,7 +19,15 @@ pub struct Create {
/// Pass N additional file descriptors to the container (stdio + $LISTEN_FDS + N in total)
#[clap(long, default_value = "0")]
pub preserve_fds: i32,
/// name of the container instance to be started
/// Do not use pivot rool to jail process inside rootfs
#[clap(long)]
pub no_pivot: bool,

// XXX: non-standard extension
#[clap(long)]
pub no_new_keyring: bool,

/// Name of the container instance to be started
#[clap(value_parser = clap::builder::NonEmptyStringValueParser::new(), required = true)]
pub container_id: String,
}

0 comments on commit c471c95

Please sign in to comment.