pub enum Command {
Single(String),
Args(Vec<String>),
}Expand description
Override for the image default CMD.
Two forms are accepted in the manifest YAML:
- A single string is interpreted shell-style, equivalent to wrapping
the value in
sh -c "...". Convenient for one-liners. - An array of strings is passed directly to the container runtime as an argument vector, giving precise control over quoting and whitespace.
Either form becomes the container Cmd. The image ENTRYPOINT is
preserved: it is never overridden, so an image declaring
ENTRYPOINT ["/usr/local/bin/app"] runs that binary with this value
appended as its arguments. Against such an image, a startup shim
written as sh -c "..." is not executed as a command of its own; it
reaches the entrypoint binary as positional arguments, which most
argument parsers reject. Only images whose entrypoint is a shell, or
which declare no entrypoint at all, run this value directly.
Used in the command field of crate::ContainerConfig and
crate::DockerfileConfig.
Variants§
Single(String)
Shell-style one-liner, e.g. "./start.sh --port 8080".
Args(Vec<String>)
Explicit argument vector, e.g. ["./start.sh", "--port", "8080"].
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Command
impl<'de> Deserialize<'de> for Command
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>,
impl Eq for Command
Source§impl JsonSchema for Command
impl JsonSchema for Command
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreimpl StructuralPartialEq for Command
Auto Trait Implementations§
impl Freeze for Command
impl RefUnwindSafe for Command
impl Send for Command
impl Sync for Command
impl Unpin for Command
impl UnsafeUnpin for Command
impl UnwindSafe for Command
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.