pub struct DockerBackend { /* private fields */ }Expand description
The remote-Docker compute backend: a connected Engine API client.
Implementations§
Source§impl DockerBackend
impl DockerBackend
Sourcepub fn connect() -> Result<Self, BackendError>
pub fn connect() -> Result<Self, BackendError>
Connect to the Docker daemon configured by the environment
(DOCKER_HOST + TLS/SSH vars, or the platform default socket).
Sourcepub fn with_client(docker: Docker) -> Self
pub fn with_client(docker: Docker) -> Self
Wrap an already-connected client (for tests / custom transports).
Sourcepub fn with_endpoint(self, endpoint: DockerEndpoint) -> Self
pub fn with_endpoint(self, endpoint: DockerEndpoint) -> Self
Select how a launched workload’s endpoint is reported (see DockerEndpoint).
Sourcepub fn with_writable_root_allowed(self, allowed: bool) -> Self
pub fn with_writable_root_allowed(self, allowed: bool) -> Self
Allow a spec’s writable_root to relax the read-only root here (single-tenant
posture). Off by default, so the multi-tenant guard keeps the hardened root.
Sourcepub fn with_cap_add_allowed(self, allowed: bool) -> Self
pub fn with_cap_add_allowed(self, allowed: bool) -> Self
Allow a spec’s cap_add to add capabilities back on top of the dropped-ALL
default here (single-tenant posture). Off by default, so the multi-tenant guard
keeps every capability dropped.
Sourcepub fn with_volume_mode(self, mode: DockerVolumeMode) -> Self
pub fn with_volume_mode(self, mode: DockerVolumeMode) -> Self
Select how persistent volumes are backed (see DockerVolumeMode).
Sourcepub fn with_data_dir(self, data_dir: impl Into<PathBuf>) -> Self
pub fn with_data_dir(self, data_dir: impl Into<PathBuf>) -> Self
Set the node data directory used for Bind-mode volume host paths.
Trait Implementations§
Source§impl ComputeBackend for DockerBackend
impl ComputeBackend for DockerBackend
Source§fn id(&self) -> &'static str
fn id(&self) -> &'static str
"vmm" / "container" / "cloudflare" / "docker").Source§fn capabilities(&self) -> Capabilities
fn capabilities(&self) -> Capabilities
Source§fn materialize<'life0, 'life1, 'async_trait>(
&'life0 self,
spec: &'life1 ComputeSpec,
) -> Pin<Box<dyn Future<Output = Result<Artifact, BackendError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn materialize<'life0, 'life1, 'async_trait>(
&'life0 self,
spec: &'life1 ComputeSpec,
) -> Pin<Box<dyn Future<Output = Result<Artifact, BackendError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
spec’s artifact into whatever this backend boots from.
Idempotent + content-addressed (cache/dedup by spec id).