pub(crate) enum ContainerOpts {
Inspect {
rootfs: Utf8PathBuf,
json: bool,
format: Option<OutputFormat>,
},
Lint {
rootfs: Utf8PathBuf,
fatal_warnings: bool,
list: bool,
skip: Vec<String>,
no_truncate: bool,
},
ComputeComposefsDigest {
path: Utf8PathBuf,
write_dumpfile_to: Option<Utf8PathBuf>,
erofs_version: ErofsVersionArg,
},
ComputeComposefsDigestFromStorage {
write_dumpfile_to: Option<Utf8PathBuf>,
erofs_version: ErofsVersionArg,
image: Option<String>,
},
SplitKernelAndRootfs {
rootfs: Utf8PathBuf,
output: Utf8PathBuf,
},
Ukify {
rootfs: Utf8PathBuf,
kargs: Vec<String>,
allow_missing_verity: bool,
erofs_version: Option<BootArtifactErofsVersionArg>,
write_dumpfile_to: Option<Utf8PathBuf>,
kernel_dir: Option<Utf8PathBuf>,
args: Vec<OsString>,
},
Aboot {
rootfs: Utf8PathBuf,
allow_missing_verity: bool,
erofs_version: Option<BootArtifactErofsVersionArg>,
write_dumpfile_to: Option<Utf8PathBuf>,
kernel_dir: Option<Utf8PathBuf>,
out: Option<Utf8PathBuf>,
},
Export {
format: ExportFormat,
output: Option<Utf8PathBuf>,
kernel_in_boot: bool,
selinux: ExportSelinuxMode,
target: Utf8PathBuf,
},
}Expand description
Subcommands which can be executed as part of a container build.
Variants§
Inspect
Output information about the container image.
By default, a human-readable summary is output. Use –json or –format to change the output format.
Fields
rootfs: Utf8PathBufOperate on the provided rootfs.
format: Option<OutputFormat>The output format.
Lint
Perform relatively inexpensive static analysis checks as part of a container build.
This is intended to be invoked via e.g. RUN bootc container lint as part
of a build process; it will error if any problems are detected.
Fields
rootfs: Utf8PathBufOperate on the provided rootfs.
list: boolInstead of executing the lints, just print all available lints. At the current time, this will output in YAML format because it’s reasonably human friendly. However, there is no commitment to maintaining this exact format; do not parse it via code or scripts.
ComputeComposefsDigest
Output the bootable composefs digest for a directory.
This is the digest that bootc container ukify embeds in the kernel
command line of a UKI. It is useful for scripting and debugging outside
of that flow.
Fields
path: Utf8PathBufPath to the filesystem root
write_dumpfile_to: Option<Utf8PathBuf>Additionally generate a dumpfile for the preferred digest, written to the target path
erofs_version: ErofsVersionArgEROFS format version to use when computing the composefs digest.
V1 produces a composefs.digest=v1-sha512-12:<hex> karg (C-tool compatible).
V2 produces the legacy composefs=<hex> karg (composefs-rs native).
ComputeComposefsDigestFromStorage
Output the bootable composefs digest from container storage.
Fields
write_dumpfile_to: Option<Utf8PathBuf>Additionally generate a dumpfile for the preferred digest, written to the target path
erofs_version: ErofsVersionArgEROFS format version to use when computing the composefs digest.
Must match the format used by compute-composefs-digest (and by
container ukify) for the two views to be comparable.
SplitKernelAndRootfs
Split kernel and rootfs from a container image
This command extracts the kernel (vmlinuz and initramfs.img) from the container rootfs and moves them to a separate output directory, organized by kernel version. Files that belong to the kernel binary are moved along with it, currently the FIPS HMAC file (.vmlinuz.hmac) that Fedora and RHEL derivatives ship.
Example: bootc container split-kernel-and-rootfs –rootfs /target-rootfs –output /out
Fields
rootfs: Utf8PathBufOperate on the provided rootfs
output: Utf8PathBufOutput directory for the extracted kernel files
Ukify
Build a Unified Kernel Image (UKI) using ukify.
This command computes the necessary arguments from the container image
(kernel, initrd, cmdline, os-release) and invokes ukify with them.
Any additional arguments after -- are passed through to ukify unchanged.
Example: bootc container ukify –rootfs /target – –output /output/uki.efi
Fields
rootfs: Utf8PathBufOperate on the provided rootfs.
kargs: Vec<String>Additional kernel arguments to append to the cmdline. Can be specified multiple times. This is a temporary workaround and will be removed.
allow_missing_verity: boolMake fs-verity validation optional in case the filesystem doesn’t support it
erofs_version: Option<BootArtifactErofsVersionArg>EROFS format version to use when computing the composefs digest.
By default, produce V1 then V2 kargs for compatibility. V1 produces a
composefs.digest=v1-sha512-12:<hex> karg (C-tool compatible), while V2
produces the legacy composefs=<hex> karg (composefs-rs native).
V1-only omits the V2 fallback to shorten the kernel command line.
Explicit V2 produces only the V2 karg as a compatibility escape hatch.
Aboot
Build an Android boot or ukiboot image using aboot-update.
Fields
rootfs: Utf8PathBufOperate on the provided rootfs.
allow_missing_verity: boolMake fs-verity validation optional in case the filesystem doesn’t support it
erofs_version: Option<BootArtifactErofsVersionArg>EROFS format version to use when computing the composefs digest.
By default, produce V1 then V2 kargs for compatibility. V1-only omits the V2 fallback to shorten the kernel command line. Explicit V2 produces only the legacy V2 karg.
Export
Export container filesystem as a tar archive.
This command exports the container filesystem in a bootable format with proper SELinux labeling. The output is written to stdout by default or to a specified file.
Example: bootc container export /target > output.tar
Fields
format: ExportFormatFormat for export output
kernel_in_boot: boolCopy kernel and initramfs from /usr/lib/modules to /boot for legacy compatibility. This is useful for installers that expect the kernel in /boot.
selinux: ExportSelinuxModeSELinux labeling mode for exported entries.
target: Utf8PathBufPath to the container filesystem root
Trait Implementations§
Source§impl Debug for ContainerOpts
impl Debug for ContainerOpts
impl Eq for ContainerOpts
Source§impl FromArgMatches for ContainerOpts
impl FromArgMatches for ContainerOpts
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut<'b>(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§impl PartialEq for ContainerOpts
impl PartialEq for ContainerOpts
impl StructuralPartialEq for ContainerOpts
Source§impl Subcommand for ContainerOpts
impl Subcommand for ContainerOpts
Source§fn augment_subcommands<'b>(__clap_app: Command) -> Command
fn augment_subcommands<'b>(__clap_app: Command) -> Command
Source§fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
Command] so it can instantiate self via
[FromArgMatches::update_from_arg_matches_mut] Read moreSource§fn has_subcommand(__clap_name: &str) -> bool
fn has_subcommand(__clap_name: &str) -> bool
Self can parse a specific subcommandAuto Trait Implementations§
impl Freeze for ContainerOpts
impl RefUnwindSafe for ContainerOpts
impl Send for ContainerOpts
impl Sync for ContainerOpts
impl Unpin for ContainerOpts
impl UnsafeUnpin for ContainerOpts
impl UnwindSafe for ContainerOpts
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
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<D> OwoColorize for D
impl<D> OwoColorize for D
§fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
§fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
§fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
§fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
§fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
§fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
§fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
§fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
§fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
§fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
§fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
§fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
§fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
§fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
§fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
§fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
§fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
§fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
§fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
§fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
§fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
§fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
§fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
§fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
§fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
§fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::fg] or
a color-specific method, such as [OwoColorize::green], Read more§fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::bg] or
a color-specific method, such as [OwoColorize::on_yellow], Read more