Skip to main content

BuildBackend

Trait BuildBackend 

Source
pub trait BuildBackend: Send + Sync {
    // Required methods
    fn build_image<'life0, 'life1, 'life2, 'life3, 'async_trait>(
        &'life0 self,
        context: &'life1 Path,
        dockerfile: &'life2 Dockerfile,
        options: &'life3 BuildOptions,
        event_tx: Option<Sender<BuildEvent>>,
    ) -> Pin<Box<dyn Future<Output = Result<BuiltImage>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: 'async_trait;
    fn push_image<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        tag: &'life1 str,
        auth: Option<&'life2 RegistryAuth>,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn tag_image<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        image: &'life1 str,
        new_tag: &'life2 str,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn manifest_create<'life0, 'life1, 'async_trait>(
        &'life0 self,
        name: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn manifest_add<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        manifest: &'life1 str,
        image: &'life2 str,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn manifest_push<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        name: &'life1 str,
        destination: &'life2 str,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn is_available<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn name(&self) -> &'static str;
}
Expand description

A pluggable build backend.

Implementations handle the low-level mechanics of building, pushing, tagging, and managing manifest lists for container images.

Required Methods§

Source

fn build_image<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, context: &'life1 Path, dockerfile: &'life2 Dockerfile, options: &'life3 BuildOptions, event_tx: Option<Sender<BuildEvent>>, ) -> Pin<Box<dyn Future<Output = Result<BuiltImage>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Build a container image from a parsed Dockerfile.

§Arguments
  • context — path to the build context directory
  • dockerfile — parsed Dockerfile IR
  • options — build configuration (tags, args, caching, etc.)
  • event_tx — optional channel for streaming progress events to a TUI
Source

fn push_image<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, tag: &'life1 str, auth: Option<&'life2 RegistryAuth>, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Push an image to a container registry.

Source

fn tag_image<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, image: &'life1 str, new_tag: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Tag an existing image with a new name.

Source

fn manifest_create<'life0, 'life1, 'async_trait>( &'life0 self, name: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Create a new (empty) manifest list.

Source

fn manifest_add<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, manifest: &'life1 str, image: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Add an image to an existing manifest list.

Source

fn manifest_push<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, name: &'life1 str, destination: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Push a manifest list (and all referenced images) to a registry.

Source

fn is_available<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns true if the backend tooling is installed and functional.

Source

fn name(&self) -> &'static str

Human-readable name for this backend (e.g. "buildah", "sandbox").

Implementors§