pub struct ContainerSpec {
pub image: String,
pub memory: String,
pub cpus: String,
pub network_mode: String,
pub volumes: Vec<VolumeMount>,
pub ports: Vec<PortMapping>,
pub environment: HashMap<String, String>,
pub entrypoint: Option<String>,
pub command: Option<Vec<String>>,
}Expand description
Specification for creating a container (image, resources, mounts, …).
Fields§
§image: StringDocker image name (e.g. python:3.11).
memory: StringMemory limit (e.g. 4g).
cpus: StringCPU limit (e.g. 4).
network_mode: StringDocker network mode.
volumes: Vec<VolumeMount>Volume mounts.
ports: Vec<PortMapping>Port mappings.
environment: HashMap<String, String>Extra environment variables.
entrypoint: Option<String>Entrypoint command override.
command: Option<Vec<String>>Command to run.
Trait Implementations§
Source§impl Clone for ContainerSpec
impl Clone for ContainerSpec
Source§fn clone(&self) -> ContainerSpec
fn clone(&self) -> ContainerSpec
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ContainerSpec
impl Debug for ContainerSpec
Source§impl<'de> Deserialize<'de> for ContainerSpec
impl<'de> Deserialize<'de> for ContainerSpec
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ContainerSpec
impl RefUnwindSafe for ContainerSpec
impl Send for ContainerSpec
impl Sync for ContainerSpec
impl Unpin for ContainerSpec
impl UnsafeUnpin for ContainerSpec
impl UnwindSafe for ContainerSpec
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