pub struct DockerBuildInvocation {
pub program: String,
pub args: Vec<String>,
}Expand description
One docker build (or docker buildx build) invocation, built up via
typed setters rather than any string template.
Fields§
§program: StringThe program to exec — "docker" by default.
args: Vec<String>Positional + flag arguments, in the order they will be passed to
Command::arg.
Implementations§
Source§impl DockerBuildInvocation
impl DockerBuildInvocation
Sourcepub fn build(
dockerfile_path: &Path,
context_dir: &Path,
image_tag: &str,
build_args: &BTreeMap<String, String>,
) -> Self
pub fn build( dockerfile_path: &Path, context_dir: &Path, image_tag: &str, build_args: &BTreeMap<String, String>, ) -> Self
Build the canonical docker build -f <dockerfile> -t <tag> --build-arg K=V ... <context> invocation.
Sourcepub fn pull(image_ref: &str) -> Self
pub fn pull(image_ref: &str) -> Self
Build a docker pull <image_ref> invocation — used to materialize a
full cache hit’s already-built image rather than re-running docker build.
Sourcepub fn history(image_ref: &str) -> Self
pub fn history(image_ref: &str) -> Self
Build a docker history --no-trunc --format '{{.CreatedBy}}' <image> invocation — one CreatedBy line per layer, newest
first, used by the equivalence checker to compare layer
count/order without the fragile fixed-column table format.
Sourcepub fn save(image_ref: &str, output_path: &Path) -> Self
pub fn save(image_ref: &str, output_path: &Path) -> Self
Build a docker save -o <output_path> <image_ref> invocation —
used by the equivalence checker to obtain a tarball it can
inspect layer-by-layer without needing a registry.
Sourcepub fn push(image_ref: &str) -> Self
pub fn push(image_ref: &str) -> Self
Build a docker push <image_ref> invocation — used by the
warmth benchmark to publish a real image to a local registry so
the cache-hit path’s docker pull is a genuine network op, not
a simulated one.
Sourcepub fn tag(source_ref: &str, target_ref: &str) -> Self
pub fn tag(source_ref: &str, target_ref: &str) -> Self
Build a docker tag <source_ref> <target_ref> invocation.
Sourcepub fn to_std_command(&self) -> Command
pub fn to_std_command(&self) -> Command
Convert to a real Command, ready to .output().
Trait Implementations§
Source§impl Clone for DockerBuildInvocation
impl Clone for DockerBuildInvocation
Source§fn clone(&self) -> DockerBuildInvocation
fn clone(&self) -> DockerBuildInvocation
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DockerBuildInvocation
impl Debug for DockerBuildInvocation
impl Eq for DockerBuildInvocation
Source§impl PartialEq for DockerBuildInvocation
impl PartialEq for DockerBuildInvocation
impl StructuralPartialEq for DockerBuildInvocation
Auto Trait Implementations§
impl Freeze for DockerBuildInvocation
impl RefUnwindSafe for DockerBuildInvocation
impl Send for DockerBuildInvocation
impl Sync for DockerBuildInvocation
impl Unpin for DockerBuildInvocation
impl UnsafeUnpin for DockerBuildInvocation
impl UnwindSafe for DockerBuildInvocation
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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>
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>
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> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.