podman_rest_client/v5/params/
image_build.rs

1#[derive(Default, Debug)]
2pub struct ImageBuild<'a> {
3    pub content_type: Option<&'a str>,
4    pub x_registry_config: Option<&'a str>,
5    /// Path within the build context to the `Dockerfile`.
6    /// This is ignored if remote is specified and points to an external `Dockerfile`.
7    pub dockerfile: Option<&'a str>,
8    /// A name and optional tag to apply to the image in the `name:tag` format. If you omit the tag, the default latest value is assumed. You can provide several t parameters.
9    pub t: Option<&'a str>,
10    /// TBD Extra hosts to add to /etc/hosts
11    /// (As of version 1.xx)
12    pub extrahosts: Option<&'a str>,
13    /// A Git repository URI or HTTP/HTTPS context URI.
14    /// If the URI points to a single text file, the file’s contents are placed
15    /// into a file called Dockerfile and the image is built from that file. If
16    /// the URI points to a tarball, the file is downloaded by the daemon and the
17    /// contents therein used as the context for the build. If the URI points to a
18    /// tarball and the dockerfile parameter is also specified, there must be a file
19    /// with the corresponding path inside the tarball.
20    /// (As of version 1.xx)
21    pub remote: Option<&'a str>,
22    /// Suppress verbose build output
23    pub q: Option<bool>,
24    /// Do not use the cache when building the image
25    /// (As of version 1.xx)
26    pub nocache: Option<bool>,
27    /// JSON array of images used to build cache resolution
28    /// (As of version 1.xx)
29    pub cachefrom: Option<&'a str>,
30    /// Attempt to pull the image even if an older image exists locally
31    /// (As of version 1.xx)
32    pub pull: Option<bool>,
33    /// Remove intermediate containers after a successful build
34    /// (As of version 1.xx)
35    pub rm: Option<bool>,
36    /// Always remove intermediate containers, even upon failure
37    /// (As of version 1.xx)
38    pub forcerm: Option<bool>,
39    /// Memory is the upper limit (in bytes) on how much memory running containers can use
40    /// (As of version 1.xx)
41    pub memory: Option<i64>,
42    /// MemorySwap limits the amount of memory and swap together
43    /// (As of version 1.xx)
44    pub memswap: Option<i64>,
45    /// CPUShares (relative weight
46    /// (As of version 1.xx)
47    pub cpushares: Option<i64>,
48    /// CPUSetCPUs in which to allow execution (0-3, 0,1)
49    /// (As of version 1.xx)
50    pub cpusetcpus: Option<&'a str>,
51    /// CPUPeriod limits the CPU CFS (Completely Fair Scheduler) period
52    /// (As of version 1.xx)
53    pub cpuperiod: Option<i64>,
54    /// CPUQuota limits the CPU CFS (Completely Fair Scheduler) quota
55    /// (As of version 1.xx)
56    pub cpuquota: Option<i64>,
57    /// JSON map of string pairs denoting build-time variables.
58    /// For example, the build argument `Foo` with the value of `bar` would be encoded in JSON as `["Foo":"bar"]`.
59    ///
60    /// For example, buildargs={"Foo":"bar"}.
61    ///
62    /// Note(s):
63    /// * This should not be used to pass secrets.
64    /// * The value of buildargs should be URI component encoded before being passed to the API.
65    ///
66    /// (As of version 1.xx)
67    pub buildargs: Option<&'a str>,
68    /// ShmSize is the "size" value to use when mounting an shmfs on the container's /dev/shm directory.
69    /// Default is 64MB
70    /// (As of version 1.xx)
71    pub shmsize: Option<i64>,
72    /// Silently ignored.
73    /// Squash the resulting images layers into a single layer
74    /// (As of version 1.xx)
75    pub squash: Option<bool>,
76    /// JSON map of key, value pairs to set as labels on the new image
77    /// (As of version 1.xx)
78    pub labels: Option<&'a str>,
79    /// Sets the networking mode for the run commands during build.
80    /// Supported standard values are:
81    ///   * `bridge` limited to containers within a single host, port mapping required for external access
82    ///   * `host` no isolation between host and containers on this network
83    ///   * `none` disable all networking for this container
84    ///   * container:<nameOrID> share networking with given container
85    ///   ---All other values are assumed to be a custom network's name
86    /// (As of version 1.xx)
87    pub networkmode: Option<&'a str>,
88    /// Platform format os[/arch[/variant]]
89    /// (As of version 1.xx)
90    pub platform: Option<&'a str>,
91    /// Target build stage
92    /// (As of version 1.xx)
93    pub target: Option<&'a str>,
94    /// output configuration TBD
95    /// (As of version 1.xx)
96    pub outputs: Option<&'a str>,
97}