pub struct ContainerRunSpec {
pub name: String,
pub image: String,
pub label: String,
pub ports: Vec<(u16, u16)>,
pub env: BTreeMap<String, String>,
pub volumes: Vec<(PathBuf, String)>,
pub cmd: Vec<String>,
pub cap_add: Vec<String>,
pub cgroupns: Option<String>,
pub network: Option<String>,
pub network_aliases: Vec<String>,
pub extra_hosts: Vec<String>,
}Expand description
Run-time spec for a single container managed by LocalRuntime::run.
Fields§
§name: StringCanonical name — see canonical_name.
image: StringImage ref. Tag-pinned for cache determinism (caddy:2.10-alpine).
label: StringValue for the yah.local-sim label (see canonical_label).
ports: Vec<(u16, u16)>Host→container port bindings.
env: BTreeMap<String, String>Container env vars.
volumes: Vec<(PathBuf, String)>Bind-mount pairs (host_path, container_path).
cmd: Vec<String>Optional CMD override; empty leaves the image default.
cap_add: Vec<String>Linux capabilities to add via --cap-add (e.g. ["SYS_ADMIN"]).
Empty by default; the pond yubaba-container path (R408-T2) sets this
so Kamaji can perform cgroup ops inside the container.
cgroupns: Option<String>Cgroup namespace mode forwarded to docker run --cgroupns=.... Valid
values are "private" and "host"; None leaves the daemon default.
The pond yubaba-container path (R408-T2) sets "private" so the
container sees a fresh /sys/fs/cgroup it can write child cgroups
under.
network: Option<String>Docker network to attach the container to via --network <name>.
None leaves the daemon default (the bridge network). The pond
per-cell bridge (R455-F1) sets this to pond_network_name.
network_aliases: Vec<String>Network aliases registered with --network-alias <alias> so siblings
on the same bridge can reach this container by name regardless of its
container name. Ignored when [network] is None.
extra_hosts: Vec<String>Extra /etc/hosts entries forwarded as --add-host <entry> (e.g.
host.docker.internal:host-gateway). The pond yubaba-container
(R408-T2) uses this so probes against host-published ports resolve on
Linux docker, where host.docker.internal is not provided by default
(OrbStack and Docker Desktop define it natively; the redundant
mapping is harmless there).
Implementations§
Source§impl ContainerRunSpec
impl ContainerRunSpec
Sourcepub fn new(
service: &str,
env: &str,
slot: &str,
image: impl Into<String>,
) -> ContainerRunSpec
pub fn new( service: &str, env: &str, slot: &str, image: impl Into<String>, ) -> ContainerRunSpec
Convenience: build a spec with the canonical name + label derived from the (service, env, slot) triple.
Sourcepub fn docker_run_args(&self) -> Vec<String>
pub fn docker_run_args(&self) -> Vec<String>
Build the full docker run … argv emitted by LocalRuntime::run.
Pure helper so callers (and tests) can inspect the wiring without a
live docker socket.
Trait Implementations§
Source§impl Clone for ContainerRunSpec
impl Clone for ContainerRunSpec
Source§fn clone(&self) -> ContainerRunSpec
fn clone(&self) -> ContainerRunSpec
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for ContainerRunSpec
impl RefUnwindSafe for ContainerRunSpec
impl Send for ContainerRunSpec
impl Sync for ContainerRunSpec
impl Unpin for ContainerRunSpec
impl UnsafeUnpin for ContainerRunSpec
impl UnwindSafe for ContainerRunSpec
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<T> Fruit for T
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more