pub struct ContainerSandbox {
pub image: String,
pub source: PathBuf,
pub name: Option<String>,
pub no_net: bool,
}Expand description
Run the agent against a Docker container. The agent itself runs on the
host, but every world.runner.exec(...) call routes through docker exec
into a long-lived container whose workspace is bind-mounted from the host.
Requires docker on PATH; the container image must include the tools the
agent intends to use (cargo, git, etc.).
Fields§
§image: StringOCI image to spawn (e.g. rust:1.92-slim).
source: PathBufHost directory to mount inside the container at /workspace.
name: Option<String>Container name; auto-generated if None.
no_net: boolPass --network none to the container.
Implementations§
Trait Implementations§
Source§impl Sandbox for ContainerSandbox
impl Sandbox for ContainerSandbox
fn fs_policy(&self) -> FsPolicy
fn net_policy(&self) -> NetPolicy
Source§fn isolation(&self) -> Isolation
fn isolation(&self) -> Isolation
What this backend actually enforces (be honest — see
Isolation).fn spawn<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<SandboxHandle, SandboxError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Auto Trait Implementations§
impl Freeze for ContainerSandbox
impl RefUnwindSafe for ContainerSandbox
impl Send for ContainerSandbox
impl Sync for ContainerSandbox
impl Unpin for ContainerSandbox
impl UnsafeUnpin for ContainerSandbox
impl UnwindSafe for ContainerSandbox
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
Mutably borrows from an owned value. Read more