MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / sandbox_seal

Function sandbox_seal

atomic-cli/src/commands/rpc.rs:6033–6051  ·  view source on GitHub ↗

`atomic sandbox seal` over SealSandboxImage — the entrypoint/env and output dir ride the wire; the CLI prints the local sealed report.

(args: &super::sandbox::Seal)

Source from the content-addressed store, hash-verified

6031/// `atomic sandbox seal` over SealSandboxImage — the entrypoint/env and
6032/// output dir ride the wire; the CLI prints the local sealed report.
6033pub fn sandbox_seal(args: &super::sandbox::Seal) -> CliResult<bool> {
6034 let Some(session) = Service::open()? else {
6035 return Ok(false);
6036 };
6037 let request = pb::SealSandboxImageRequest {
6038 repository: Some(session.reference.clone()),
6039 meta: request_meta(),
6040 name: args.view.clone(),
6041 out_dir: args.out.display().to_string(),
6042 entrypoint: args.entrypoint.clone(),
6043 env: args.env.clone(),
6044 };
6045 let response = session.seal_sandbox_image(request)?;
6046 println!("Sealed '{}'", args.view);
6047 println!(" Image: {}", response.image_dir);
6048 println!(" Manifest: {}", response.manifest_digest);
6049 println!(" Files: {}", response.files);
6050 Ok(true)
6051}
6052
6053// ---------------------------------------------------------------------------
6054// top-level split (CreateView's FromView semantics + SwitchView)

Callers 1

runMethod · 0.85

Calls 5

openFunction · 0.85
displayMethod · 0.80
request_metaFunction · 0.70
cloneMethod · 0.45
seal_sandbox_imageMethod · 0.45

Tested by

no test coverage detected