File tree 2 files changed +12
-4
lines changed
2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ checks as part of a container build
5
5
6
6
# SYNOPSIS
7
7
8
- ** bootc container lint** \[ ** -h** \| ** \- -help** \]
8
+ ** bootc container lint** \[ ** \- -rootfs ** \] \[ ** -h** \| ** \- -help** \]
9
9
10
10
# DESCRIPTION
11
11
@@ -17,6 +17,10 @@ part of a build process; it will error if any problems are detected.
17
17
18
18
# OPTIONS
19
19
20
+ ** \- -rootfs** =* ROOTFS* \[ default: /\]
21
+
22
+ : Operate on the provided rootfs
23
+
20
24
** -h** , ** \- -help**
21
25
22
26
: Print help (see a summary with -h)
Original file line number Diff line number Diff line change @@ -241,7 +241,11 @@ pub(crate) enum ContainerOpts {
241
241
///
242
242
/// This is intended to be invoked via e.g. `RUN bootc container lint` as part
243
243
/// of a build process; it will error if any problems are detected.
244
- Lint ,
244
+ Lint {
245
+ /// Operate on the provided rootfs.
246
+ #[ clap( long, default_value = "/" ) ]
247
+ rootfs : Utf8PathBuf ,
248
+ } ,
245
249
}
246
250
247
251
/// Subcommands which operate on images.
@@ -1007,13 +1011,13 @@ async fn run_from_opt(opt: Opt) -> Result<()> {
1007
1011
Opt :: Edit ( opts) => edit ( opts) . await ,
1008
1012
Opt :: UsrOverlay => usroverlay ( ) . await ,
1009
1013
Opt :: Container ( opts) => match opts {
1010
- ContainerOpts :: Lint => {
1014
+ ContainerOpts :: Lint { rootfs } => {
1011
1015
if !ostree_ext:: container_utils:: is_ostree_container ( ) ? {
1012
1016
anyhow:: bail!(
1013
1017
"Not in a ostree container, this command only verifies ostree containers."
1014
1018
) ;
1015
1019
}
1016
-
1020
+ let root = & Dir :: open_ambient_dir ( rootfs , cap_std :: ambient_authority ( ) ) ? ;
1017
1021
lints:: lint ( root) ?;
1018
1022
Ok ( ( ) )
1019
1023
}
You can’t perform that action at this time.
0 commit comments