MCPcopy Create free account
hub / github.com/bootc-dev/bootc / imgcmd_entrypoint

Function imgcmd_entrypoint

crates/lib/src/image.rs:260–269  ·  view source on GitHub ↗

Thin wrapper for invoking `podman image ` but set up for our internal image store (as distinct from /var/lib/containers default).

(
    storage: &CStorage,
    arg: &str,
    args: &[std::ffi::OsString],
)

Source from the content-addressed store, hash-verified

258/// Thin wrapper for invoking `podman image <X>` but set up for our internal
259/// image store (as distinct from /var/lib/containers default).
260pub(crate) async fn imgcmd_entrypoint(
261 storage: &CStorage,
262 arg: &str,
263 args: &[std::ffi::OsString],
264) -> std::result::Result<(), anyhow::Error> {
265 let mut cmd = storage.new_image_cmd()?;
266 cmd.arg(arg);
267 cmd.args(args);
268 cmd.run_capture_stderr()
269}
270
271/// Re-pull the currently booted image into the bootc-owned container storage.
272///

Callers 1

run_from_optFunction · 0.85

Calls 4

new_image_cmdMethod · 0.80
argMethod · 0.80
argsMethod · 0.80
run_capture_stderrMethod · 0.80

Tested by

no test coverage detected