pub struct BuildxCreateCommand {
pub executor: CommandExecutor,
/* private fields */
}Expand description
Docker buildx create command builder
Creates a new builder instance for multi-platform builds.
§Example
use docker_wrapper::{DockerCommand, BuildxCreateCommand};
let result = BuildxCreateCommand::new()
.name("mybuilder")
.driver("docker-container")
.platform("linux/amd64")
.platform("linux/arm64")
.use_builder()
.bootstrap()
.execute()
.await?;
println!("Created builder: {}", result.name);Fields§
§executor: CommandExecutorCommand executor
Implementations§
Source§impl BuildxCreateCommand
impl BuildxCreateCommand
Sourcepub fn buildkitd_config(self, config: impl Into<String>) -> Self
pub fn buildkitd_config(self, config: impl Into<String>) -> Self
Set the BuildKit daemon config file
Sourcepub fn buildkitd_flags(self, flags: impl Into<String>) -> Self
pub fn buildkitd_flags(self, flags: impl Into<String>) -> Self
Set the BuildKit daemon flags
Sourcepub fn driver(self, driver: impl Into<String>) -> Self
pub fn driver(self, driver: impl Into<String>) -> Self
Set the driver to use (docker-container, kubernetes, remote)
Sourcepub fn driver_opt(self, opt: impl Into<String>) -> Self
pub fn driver_opt(self, opt: impl Into<String>) -> Self
Add a driver option
Sourcepub fn platform(self, platform: impl Into<String>) -> Self
pub fn platform(self, platform: impl Into<String>) -> Self
Add a fixed platform for current node
Sourcepub fn use_builder(self) -> Self
pub fn use_builder(self) -> Self
Set the current builder instance after creation
Trait Implementations§
Source§impl Clone for BuildxCreateCommand
impl Clone for BuildxCreateCommand
Source§fn clone(&self) -> BuildxCreateCommand
fn clone(&self) -> BuildxCreateCommand
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BuildxCreateCommand
impl Debug for BuildxCreateCommand
Source§impl Default for BuildxCreateCommand
impl Default for BuildxCreateCommand
Source§fn default() -> BuildxCreateCommand
fn default() -> BuildxCreateCommand
Returns the “default value” for a type. Read more
Source§impl DockerCommand for BuildxCreateCommand
impl DockerCommand for BuildxCreateCommand
Source§type Output = BuildxCreateResult
type Output = BuildxCreateResult
The output type this command produces
Source§fn get_executor(&self) -> &CommandExecutor
fn get_executor(&self) -> &CommandExecutor
Get the command executor for extensibility
Source§fn get_executor_mut(&mut self) -> &mut CommandExecutor
fn get_executor_mut(&mut self) -> &mut CommandExecutor
Get mutable command executor for extensibility
Source§fn build_command_args(&self) -> Vec<String>
fn build_command_args(&self) -> Vec<String>
Build the complete command arguments including subcommands
Source§fn execute<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Self::Output>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn execute<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Self::Output>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Execute the command and return the typed output
Source§fn execute_command<'life0, 'async_trait>(
&'life0 self,
command_args: Vec<String>,
) -> Pin<Box<dyn Future<Output = Result<CommandOutput>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn execute_command<'life0, 'async_trait>(
&'life0 self,
command_args: Vec<String>,
) -> Pin<Box<dyn Future<Output = Result<CommandOutput>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Helper method to execute the command with proper error handling
Source§fn arg<S: AsRef<OsStr>>(&mut self, arg: S) -> &mut Self
fn arg<S: AsRef<OsStr>>(&mut self, arg: S) -> &mut Self
Add a raw argument to the command (escape hatch)
Source§fn args<I, S>(&mut self, args: I) -> &mut Self
fn args<I, S>(&mut self, args: I) -> &mut Self
Add multiple raw arguments to the command (escape hatch)
Source§fn option(&mut self, key: &str, value: &str) -> &mut Self
fn option(&mut self, key: &str, value: &str) -> &mut Self
Add a key-value option (e.g., –name value, –env key=value)
Source§fn with_timeout(&mut self, timeout: Duration) -> &mut Self
fn with_timeout(&mut self, timeout: Duration) -> &mut Self
Set a timeout for command execution Read more
Source§fn with_timeout_secs(&mut self, seconds: u64) -> &mut Self
fn with_timeout_secs(&mut self, seconds: u64) -> &mut Self
Set a timeout in seconds for command execution
Auto Trait Implementations§
impl Freeze for BuildxCreateCommand
impl RefUnwindSafe for BuildxCreateCommand
impl Send for BuildxCreateCommand
impl Sync for BuildxCreateCommand
impl Unpin for BuildxCreateCommand
impl UnwindSafe for BuildxCreateCommand
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