pub struct ImageBuildRequest<S> { /* private fields */ }Expand description
Configure a build for a source with a fluent API. Configuration methods consume and return the request.
Implementations§
Source§impl<S: BuildContextProvider> ImageBuildRequest<S>
impl<S: BuildContextProvider> ImageBuildRequest<S>
Sourcepub fn with_options(self, options: BuildOptions) -> Self
pub fn with_options(self, options: BuildOptions) -> Self
Replace all build options. Move the options into this request.
Sourcepub fn with_dockerfile(self, path: impl Into<String>) -> Self
pub fn with_dockerfile(self, path: impl Into<String>) -> Self
Set the Dockerfile path relative to the context. Use forward slashes in this path.
Sourcepub fn with_build_argument(
self,
name: impl Into<String>,
value: impl Into<String>,
) -> Self
pub fn with_build_argument( self, name: impl Into<String>, value: impl Into<String>, ) -> Self
Set or replace one build argument. Keep all other arguments in this request.
Sourcepub fn with_target(self, target: impl Into<String>) -> Self
pub fn with_target(self, target: impl Into<String>) -> Self
Select the final build stage. Use with_options to clear the selected stage.
Sourcepub fn with_platform(self, platform: impl Into<String>) -> Self
pub fn with_platform(self, platform: impl Into<String>) -> Self
Select the target platform, such as linux/amd64. Use with_options to restore the Docker default.
Sourcepub fn with_no_cache(self, no_cache: bool) -> Self
pub fn with_no_cache(self, no_cache: bool) -> Self
Control the Docker layer cache. Pass true to disable the cache.
Sourcepub fn with_timeout(self, timeout: Duration) -> Self
pub fn with_timeout(self, timeout: Duration) -> Self
Set the time limit for source resolution and the build. The time limit must be positive.
Sourcepub async fn build(self) -> Result<BuiltImage>
pub async fn build(self) -> Result<BuiltImage>
Resolve the source and build the configured image. Consume this request and return its unique image tag.
Auto Trait Implementations§
impl<S> !RefUnwindSafe for ImageBuildRequest<S>
impl<S> !UnwindSafe for ImageBuildRequest<S>
impl<S> Freeze for ImageBuildRequest<S>where
S: Freeze,
impl<S> Send for ImageBuildRequest<S>where
S: Send,
impl<S> Sync for ImageBuildRequest<S>where
S: Sync,
impl<S> Unpin for ImageBuildRequest<S>where
S: Unpin,
impl<S> UnsafeUnpin for ImageBuildRequest<S>where
S: UnsafeUnpin,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request