Struct podman_api::opts::ImageBuildOptsBuilder
source · pub struct ImageBuildOptsBuilder { /* private fields */ }
Expand description
A builder struct for ImageBuildOpts.
Implementations§
source§impl ImageBuildOptsBuilder
impl ImageBuildOptsBuilder
sourcepub fn all_platforms(self, all_platforms: bool) -> Self
pub fn all_platforms(self, all_platforms: bool) -> Self
Instead of building for a set of platforms specified using the platform option, inspect the build’s base images, and build for all of the platforms that are available. Stages that use scratch as a starting point can not be inspected, so at least one non-scratch stage must be present for detection to work usefully.
sourcepub fn build_args<K, V>(
self,
build_args: impl IntoIterator<Item = (K, V)>
) -> Selfwhere
K: Serialize + Eq + Hash,
V: Serialize,
pub fn build_args<K, V>(
self,
build_args: impl IntoIterator<Item = (K, V)>
) -> Selfwhere
K: Serialize + Eq + Hash,
V: Serialize,
Key-value build time variables.
sourcepub fn cache_from<S>(self, images: impl IntoIterator<Item = S>) -> Selfwhere
S: Into<String>,
pub fn cache_from<S>(self, images: impl IntoIterator<Item = S>) -> Selfwhere
S: Into<String>,
List of images used to build cache resolution
sourcepub fn cpu_period(self, cpu_period: isize) -> Self
pub fn cpu_period(self, cpu_period: isize) -> Self
Limits the CPU CFS (Completely Fair Scheduler) period.
sourcepub fn cpu_quota(self, cpu_quota: isize) -> Self
pub fn cpu_quota(self, cpu_quota: isize) -> Self
Limits the CPU CFS (Completely Fair Scheduler) quota.
sourcepub fn cpu_set_cpus(self, cpu_set_cpus: isize) -> Self
pub fn cpu_set_cpus(self, cpu_set_cpus: isize) -> Self
Set CPUs in which to allow execution. Example: 0-1
, 1-3
CPU shares - relative weights
sourcepub fn dockerfile(self, dockerfile: impl Into<String>) -> Self
pub fn dockerfile(self, dockerfile: impl Into<String>) -> Self
Path within the build context to the Dockerfile. This is ignored if remote is specified and points to an external Dockerfile.
sourcepub fn extra_hosts(self, extra_hosts: impl Into<String>) -> Self
pub fn extra_hosts(self, extra_hosts: impl Into<String>) -> Self
Extra hosts to add to /etc/hosts.
sourcepub fn force_rm(self, force_rm: bool) -> Self
pub fn force_rm(self, force_rm: bool) -> Self
Always remove intermediate containers, even upon failure.
sourcepub fn http_proxy(self, http_proxy: bool) -> Self
pub fn http_proxy(self, http_proxy: bool) -> Self
Inject http proxy environment variables into container.
sourcepub fn labels<K, V>(self, labels: impl IntoIterator<Item = (K, V)>) -> Selfwhere
K: Serialize + Eq + Hash,
V: Serialize,
pub fn labels<K, V>(self, labels: impl IntoIterator<Item = (K, V)>) -> Selfwhere
K: Serialize + Eq + Hash,
V: Serialize,
Key-value pairs to set as labels on the new image.
sourcepub fn memory(self, memory: usize) -> Self
pub fn memory(self, memory: usize) -> Self
The upper limit (in bytes) on how much memory running containers can use.
sourcepub fn network_mode(self, network_mode: NetworkMode) -> Self
pub fn network_mode(self, network_mode: NetworkMode) -> Self
Set the networking mode for the run commands during build.
pub fn platform(self, platform: Platform) -> Self
sourcepub fn pull(self, pull: bool) -> Self
pub fn pull(self, pull: bool) -> Self
Attempt to pull the image even if an older image exists locally.
sourcepub fn remote(self, remote: impl Into<String>) -> Self
pub fn remote(self, remote: impl Into<String>) -> Self
A Git repository URI or HTTP/HTTPS context URI. If the URI points to a single text file, the file’s contents are placed into a file called Dockerfile and the image is built from that file. If the URI points to a tarball, the file is downloaded by the daemon and the contents therein used as the context for the build. If the URI points to a tarball and the dockerfile parameter is also specified, there must be a file with the corresponding path inside the tarball.
sourcepub fn remove(self, remove: bool) -> Self
pub fn remove(self, remove: bool) -> Self
Remove intermediate containers after a successful build.
Value to use when mounting an shmfs on the container’s /dev/shm directory. Default is 64MB
sourcepub fn squash(self, squash: bool) -> Self
pub fn squash(self, squash: bool) -> Self
Silently ignored. Squash the resulting images layers into a single layer.
sourcepub fn tag(self, tag: impl Into<String>) -> Self
pub fn tag(self, tag: impl Into<String>) -> Self
A name and optional tag to apply to the image in the name:tag
format.
sourcepub fn unset_env<S>(self, unset_env: impl IntoIterator<Item = S>) -> Selfwhere
S: Into<String>,
pub fn unset_env<S>(self, unset_env: impl IntoIterator<Item = S>) -> Selfwhere
S: Into<String>,
Unset environment variables from the final image.
Trait Implementations§
source§impl Clone for ImageBuildOptsBuilder
impl Clone for ImageBuildOptsBuilder
source§fn clone(&self) -> ImageBuildOptsBuilder
fn clone(&self) -> ImageBuildOptsBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more