pub struct ContainerSpec {
pub name: String,
pub project: String,
pub resource: String,
pub image: ImageSource,
pub env: HashMap<String, String>,
pub ports: Vec<PortBinding>,
pub volumes: Vec<VolumeBinding>,
pub command: Option<Vec<String>>,
pub healthcheck: Option<HealthcheckSpec>,
}Expand description
Self-contained description of a container to start, derived from a manifest resource.
Fields§
§name: StringContainer name, of the form <project>_<resource>.
project: StringProject name as declared in the manifest. Used as a Docker
label for discovery by ps and down.
resource: StringResource name as declared in the manifest. Used as a Docker label so the CLI can find a single resource by name.
image: ImageSourceHow the container image is obtained.
env: HashMap<String, String>Environment variables to inject into the container.
ports: Vec<PortBinding>Ports to publish.
volumes: Vec<VolumeBinding>Volumes to mount.
command: Option<Vec<String>>Optional command override.
healthcheck: Option<HealthcheckSpec>Optional healthcheck.
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 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto 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