Struct podman_api::opts::ImageBuildOptsBuilder
source · [−]pub struct ImageBuildOptsBuilder { /* private fields */ }
Expand description
A builder struct for ImageBuildOpts.
Implementations
sourceimpl ImageBuildOptsBuilder
impl ImageBuildOptsBuilder
sourcepub fn build(self) -> ImageBuildOpts
pub fn build(self) -> ImageBuildOpts
Finish building ImageBuildOpts.
sourceimpl ImageBuildOptsBuilder
impl ImageBuildOptsBuilder
sourcepub fn build_args<I, K, V>(self, build_args: I) -> Self where
I: IntoIterator<Item = (K, V)>,
K: AsRef<str> + Serialize + Eq + Hash,
V: AsRef<str> + Serialize,
pub fn build_args<I, K, V>(self, build_args: I) -> Self where
I: IntoIterator<Item = (K, V)>,
K: AsRef<str> + Serialize + Eq + Hash,
V: AsRef<str> + Serialize,
Key-value build time variables.
sourcepub fn cache_from<I>(self, images: impl IntoIterator<Item = I>) -> Self where
I: Into<String>,
pub fn cache_from<I>(self, images: impl IntoIterator<Item = I>) -> Self where
I: 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<I, K, V>(self, labels: I) -> Self where
I: IntoIterator<Item = (K, V)>,
K: AsRef<str> + Serialize + Eq + Hash,
V: AsRef<str> + Serialize,
pub fn labels<I, K, V>(self, labels: I) -> Self where
I: IntoIterator<Item = (K, V)>,
K: AsRef<str> + Serialize + Eq + Hash,
V: AsRef<str> + 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.
Trait Implementations
sourceimpl Clone for ImageBuildOptsBuilder
impl Clone for ImageBuildOptsBuilder
sourcefn clone(&self) -> ImageBuildOptsBuilder
fn clone(&self) -> ImageBuildOptsBuilder
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for ImageBuildOptsBuilder
impl Debug for ImageBuildOptsBuilder
sourceimpl Default for ImageBuildOptsBuilder
impl Default for ImageBuildOptsBuilder
sourcefn default() -> ImageBuildOptsBuilder
fn default() -> ImageBuildOptsBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl RefUnwindSafe for ImageBuildOptsBuilder
impl Send for ImageBuildOptsBuilder
impl Sync for ImageBuildOptsBuilder
impl Unpin for ImageBuildOptsBuilder
impl UnwindSafe for ImageBuildOptsBuilder
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more