pub struct Config { /* private fields */ }
Expand description
The execution parameters which SHOULD be used as a base when running a container using the image.
Implementations§
source§impl Config
impl Config
sourcepub fn user(&self) -> &Option<String>
pub fn user(&self) -> &Option<String>
The username or UID which is a platform-specific structure that allows specific control over which user the process run as. This acts as a default value to use when the value is not specified when creating a container. For Linux based systems, all of the following are valid: user, uid, user:group, uid:gid, uid:group, user:gid. If group/gid is not specified, the default group and supplementary groups of the given user/uid in /etc/passwd from the container are applied.
sourcepub fn exposed_ports(&self) -> &Option<Vec<String>>
pub fn exposed_ports(&self) -> &Option<Vec<String>>
A set of ports to expose from a container running this image. Its keys can be in the format of: port/tcp, port/udp, port with the default protocol being tcp if not specified. These values act as defaults and are merged with any specified when creating a container.
sourcepub fn env(&self) -> &Option<Vec<String>>
pub fn env(&self) -> &Option<Vec<String>>
Entries are in the format of VARNAME=VARVALUE. These values act as defaults and are merged with any specified when creating a container.
sourcepub fn entrypoint(&self) -> &Option<Vec<String>>
pub fn entrypoint(&self) -> &Option<Vec<String>>
A list of arguments to use as the command to execute when the container starts. These values act as defaults and may be replaced by an entrypoint specified when creating a container.
sourcepub fn cmd(&self) -> &Option<Vec<String>>
pub fn cmd(&self) -> &Option<Vec<String>>
Default arguments to the entrypoint of the container. These values act as defaults and may be replaced by any specified when creating a container. If an Entrypoint value is not specified, then the first entry of the Cmd array SHOULD be interpreted as the executable to run.
sourcepub fn volumes(&self) -> &Option<Vec<String>>
pub fn volumes(&self) -> &Option<Vec<String>>
A set of directories describing where the process is likely to write data specific to a container instance.
sourcepub fn working_dir(&self) -> &Option<String>
pub fn working_dir(&self) -> &Option<String>
Sets the current working directory of the entrypoint process in the container. This value acts as a default and may be replaced by a working directory specified when creating a container.
sourcepub fn labels(&self) -> &Option<HashMap<String, String>>
pub fn labels(&self) -> &Option<HashMap<String, String>>
The field contains arbitrary metadata for the container. This property MUST use the annotation rules.
sourcepub fn stop_signal(&self) -> &Option<String>
pub fn stop_signal(&self) -> &Option<String>
The field contains the system call signal that will be sent to the container to exit. The signal can be a signal name in the format SIGNAME, for instance SIGKILL or SIGRTMIN+3.
source§impl Config
impl Config
sourcepub fn set_user(&mut self, val: Option<String>) -> &mut Self
pub fn set_user(&mut self, val: Option<String>) -> &mut Self
The username or UID which is a platform-specific structure that allows specific control over which user the process run as. This acts as a default value to use when the value is not specified when creating a container. For Linux based systems, all of the following are valid: user, uid, user:group, uid:gid, uid:group, user:gid. If group/gid is not specified, the default group and supplementary groups of the given user/uid in /etc/passwd from the container are applied.
sourcepub fn set_exposed_ports(&mut self, val: Option<Vec<String>>) -> &mut Self
pub fn set_exposed_ports(&mut self, val: Option<Vec<String>>) -> &mut Self
A set of ports to expose from a container running this image. Its keys can be in the format of: port/tcp, port/udp, port with the default protocol being tcp if not specified. These values act as defaults and are merged with any specified when creating a container.
sourcepub fn set_env(&mut self, val: Option<Vec<String>>) -> &mut Self
pub fn set_env(&mut self, val: Option<Vec<String>>) -> &mut Self
Entries are in the format of VARNAME=VARVALUE. These values act as defaults and are merged with any specified when creating a container.
sourcepub fn set_entrypoint(&mut self, val: Option<Vec<String>>) -> &mut Self
pub fn set_entrypoint(&mut self, val: Option<Vec<String>>) -> &mut Self
A list of arguments to use as the command to execute when the container starts. These values act as defaults and may be replaced by an entrypoint specified when creating a container.
sourcepub fn set_cmd(&mut self, val: Option<Vec<String>>) -> &mut Self
pub fn set_cmd(&mut self, val: Option<Vec<String>>) -> &mut Self
Default arguments to the entrypoint of the container. These values act as defaults and may be replaced by any specified when creating a container. If an Entrypoint value is not specified, then the first entry of the Cmd array SHOULD be interpreted as the executable to run.
sourcepub fn set_volumes(&mut self, val: Option<Vec<String>>) -> &mut Self
pub fn set_volumes(&mut self, val: Option<Vec<String>>) -> &mut Self
A set of directories describing where the process is likely to write data specific to a container instance.
sourcepub fn set_working_dir(&mut self, val: Option<String>) -> &mut Self
pub fn set_working_dir(&mut self, val: Option<String>) -> &mut Self
Sets the current working directory of the entrypoint process in the container. This value acts as a default and may be replaced by a working directory specified when creating a container.
sourcepub fn set_labels(&mut self, val: Option<HashMap<String, String>>) -> &mut Self
pub fn set_labels(&mut self, val: Option<HashMap<String, String>>) -> &mut Self
The field contains arbitrary metadata for the container. This property MUST use the annotation rules.
sourcepub fn set_stop_signal(&mut self, val: Option<String>) -> &mut Self
pub fn set_stop_signal(&mut self, val: Option<String>) -> &mut Self
The field contains the system call signal that will be sent to the container to exit. The signal can be a signal name in the format SIGNAME, for instance SIGKILL or SIGRTMIN+3.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Config
impl<'de> Deserialize<'de> for Config
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>,
source§impl PartialEq for Config
impl PartialEq for Config
impl Eq for Config
impl StructuralPartialEq for Config
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)