podman_rest_client/v5/models/
image_config.rs

1use serde::{Deserialize, Serialize};
2#[derive(Default, Debug, Serialize, Deserialize)]
3/// ImageConfig defines the execution parameters which should be used as a base when running a container using an image.
4pub struct ImageConfig {
5    /// ArgsEscaped
6    ///
7    /// Deprecated: This field is present only for legacy compatibility with
8    /// Docker and should not be used by new image builders.  It is used by Docker
9    /// for Windows images to indicate that the `Entrypoint` or `Cmd` or both,
10    /// contains only a single element array, that is a pre-escaped, and combined
11    /// into a single string `CommandLine`. If `true` the value in `Entrypoint` or
12    /// `Cmd` should be used as-is to avoid double escaping.
13    /// https://github.com/opencontainers/image-spec/pull/892
14    #[serde(rename = "ArgsEscaped")]
15    pub args_escaped: Option<bool>,
16    /// Cmd defines the default arguments to the entrypoint of the container.
17    #[serde(rename = "Cmd")]
18    pub cmd: Option<Vec<String>>,
19    /// Entrypoint defines a list of arguments to use as the command to execute when the container starts.
20    #[serde(rename = "Entrypoint")]
21    pub entrypoint: Option<Vec<String>>,
22    /// Env is a list of environment variables to be used in a container.
23    #[serde(rename = "Env")]
24    pub env: Option<Vec<String>>,
25    /// ExposedPorts a set of ports to expose from a container running this image.
26    #[serde(rename = "ExposedPorts")]
27    pub exposed_ports: Option<std::collections::HashMap<String, serde_json::Value>>,
28    /// Labels contains arbitrary metadata for the container.
29    #[serde(rename = "Labels")]
30    pub labels: Option<std::collections::HashMap<String, String>>,
31    /// StopSignal contains the system call signal that will be sent to the container to exit.
32    #[serde(rename = "StopSignal")]
33    pub stop_signal: Option<String>,
34    /// User defines the username or UID which the process in the container should run as.
35    #[serde(rename = "User")]
36    pub user: Option<String>,
37    /// Volumes is a set of directories describing where the process is likely write data specific to a container instance.
38    #[serde(rename = "Volumes")]
39    pub volumes: Option<std::collections::HashMap<String, serde_json::Value>>,
40    /// WorkingDir sets the current working directory of the entrypoint process in the container.
41    #[serde(rename = "WorkingDir")]
42    pub working_dir: Option<String>,
43}