feat(rechunk): Add the ability to rechunk an image
This commit is contained in:
parent
ffa1789422
commit
b4fbac2a66
22 changed files with 1002 additions and 190 deletions
|
|
@ -20,6 +20,9 @@ pub struct BuildOpts<'scope> {
|
|||
|
||||
#[builder(default)]
|
||||
pub platform: Platform,
|
||||
|
||||
#[builder(default)]
|
||||
pub host_network: bool,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Builder)]
|
||||
|
|
|
|||
47
process/drivers/opts/rechunk.rs
Normal file
47
process/drivers/opts/rechunk.rs
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
use std::{borrow::Cow, path::Path};
|
||||
|
||||
use bon::Builder;
|
||||
|
||||
use crate::drivers::types::Platform;
|
||||
|
||||
use super::CompressionType;
|
||||
|
||||
#[derive(Debug, Clone, Builder)]
|
||||
#[builder(on(Cow<'_, str>, into))]
|
||||
pub struct RechunkOpts<'scope> {
|
||||
pub image: Cow<'scope, str>,
|
||||
|
||||
#[builder(into)]
|
||||
pub containerfile: Cow<'scope, Path>,
|
||||
|
||||
#[builder(default)]
|
||||
pub platform: Platform,
|
||||
pub version: Cow<'scope, str>,
|
||||
pub name: Cow<'scope, str>,
|
||||
pub description: Cow<'scope, str>,
|
||||
pub base_digest: Cow<'scope, str>,
|
||||
pub base_image: Cow<'scope, str>,
|
||||
pub repo: Cow<'scope, str>,
|
||||
|
||||
/// The list of tags for the image being built.
|
||||
#[builder(default, into)]
|
||||
pub tags: Vec<Cow<'scope, str>>,
|
||||
|
||||
/// Enable pushing the image.
|
||||
#[builder(default)]
|
||||
pub push: bool,
|
||||
|
||||
/// Enable retry logic for pushing.
|
||||
#[builder(default)]
|
||||
pub retry_push: bool,
|
||||
|
||||
/// Number of times to retry pushing.
|
||||
///
|
||||
/// Defaults to 1.
|
||||
#[builder(default = 1)]
|
||||
pub retry_count: u8,
|
||||
|
||||
/// The compression type to use when pushing.
|
||||
#[builder(default)]
|
||||
pub compression: CompressionType,
|
||||
}
|
||||
|
|
@ -15,8 +15,9 @@ pub struct RunOpts<'scope> {
|
|||
|
||||
#[builder(default, into)]
|
||||
pub volumes: Vec<RunOptsVolume<'scope>>,
|
||||
pub uid: Option<u32>,
|
||||
pub gid: Option<u32>,
|
||||
|
||||
#[builder(into)]
|
||||
pub user: Option<Cow<'scope, str>>,
|
||||
|
||||
#[builder(default)]
|
||||
pub privileged: bool,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue