pub struct ContainerConfig {Show 15 fields
pub hostname: Option<String>,
pub domainname: Option<String>,
pub user: Option<String>,
pub exposed_ports: BTreeMap<String, EmptyObject>,
pub env: Vec<String>,
pub entrypoint: Option<Vec<String>>,
pub cmd: Option<Vec<String>>,
pub volumes: BTreeMap<String, EmptyObject>,
pub working_dir: Option<String>,
pub labels: BTreeMap<String, String>,
pub stop_signal: Option<String>,
pub healthcheck: Option<Healthcheck>,
pub on_build: Vec<String>,
pub shell: Option<Vec<String>>,
pub args_escaped: bool,
}Expand description
Container runtime configuration.
Fields§
§hostname: Option<String>Hostname.
domainname: Option<String>Domain name.
user: Option<String>User to run as.
exposed_ports: BTreeMap<String, EmptyObject>Exposed ports.
env: Vec<String>Environment variables.
entrypoint: Option<Vec<String>>Entrypoint command.
cmd: Option<Vec<String>>Default command.
volumes: BTreeMap<String, EmptyObject>Volumes.
working_dir: Option<String>Working directory.
labels: BTreeMap<String, String>Labels.
stop_signal: Option<String>Stop signal.
healthcheck: Option<Healthcheck>Health check configuration.
on_build: Vec<String>Dockerfile ONBUILD triggers.
shell: Option<Vec<String>>Shell for shell-form RUN commands.
args_escaped: boolWindows-specific: whether args should be escaped.
Implementations§
Source§impl ContainerConfig
impl ContainerConfig
Sourcepub fn with_entrypoint(self, entrypoint: Vec<String>) -> Self
pub fn with_entrypoint(self, entrypoint: Vec<String>) -> Self
Sets the entrypoint.
Sourcepub fn with_label(
self,
key: impl Into<String>,
value: impl Into<String>,
) -> Self
pub fn with_label( self, key: impl Into<String>, value: impl Into<String>, ) -> Self
Adds a label.
Sourcepub fn with_working_dir(self, dir: impl Into<String>) -> Self
pub fn with_working_dir(self, dir: impl Into<String>) -> Self
Sets the working directory.
Trait Implementations§
Source§impl Clone for ContainerConfig
impl Clone for ContainerConfig
Source§fn clone(&self) -> ContainerConfig
fn clone(&self) -> ContainerConfig
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 ContainerConfig
impl Debug for ContainerConfig
Source§impl Default for ContainerConfig
impl Default for ContainerConfig
Source§fn default() -> ContainerConfig
fn default() -> ContainerConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ContainerConfig
impl<'de> Deserialize<'de> for ContainerConfig
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
Source§impl PartialEq for ContainerConfig
impl PartialEq for ContainerConfig
Source§impl Serialize for ContainerConfig
impl Serialize for ContainerConfig
impl Eq for ContainerConfig
impl StructuralPartialEq for ContainerConfig
Auto Trait Implementations§
impl Freeze for ContainerConfig
impl RefUnwindSafe for ContainerConfig
impl Send for ContainerConfig
impl Sync for ContainerConfig
impl Unpin for ContainerConfig
impl UnsafeUnpin for ContainerConfig
impl UnwindSafe for ContainerConfig
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