pub struct ContainerConfig {
pub name: String,
pub image: String,
pub command: Vec<String>,
pub environment: HashMap<String, String>,
pub ports: HashMap<u16, u16>,
pub volumes: Vec<VolumeMount>,
pub resources: ResourceLimits,
pub network: NetworkConfig,
pub restart_policy: Option<RestartPolicy>,
pub healthcheck: Option<HealthCheck>,
pub deploy: Option<DeployConfig>,
}Expand description
容器配置
Fields§
§name: String容器名称
image: String镜像名称
command: Vec<String>命令
environment: HashMap<String, String>环境变量
ports: HashMap<u16, u16>端口映射
volumes: Vec<VolumeMount>挂载卷
resources: ResourceLimits资源限制
network: NetworkConfig网络配置
restart_policy: Option<RestartPolicy>重启策略
healthcheck: Option<HealthCheck>健康检查配置
deploy: Option<DeployConfig>部署配置
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<'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
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