podman_rest_client/v5/params/
image_build_libpod.rs

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