Skip to main content

BuildError

Enum BuildError 

Source
pub enum BuildError {
Show 20 variants DockerfileParse { message: String, line: usize, }, ContextRead { path: PathBuf, source: Error, }, PathEscape { path: PathBuf, }, FileIgnored { path: PathBuf, }, StageNotFound { name: String, }, RunFailed { command: String, exit_code: i32, }, LayerCreate { message: String, }, CacheError { message: String, }, RegistryError { message: String, }, IoError(Error), VariableExpansion(String), InvalidInstruction { instruction: String, reason: String, }, BuildahExecution { command: String, exit_code: i32, stderr: String, }, ContextTooLarge { size: u64, max: u64, }, BaseImageNotFound { image: String, }, CircularDependency { stages: Vec<String>, }, BuildahNotFound { message: String, }, ZImagefileParse { message: String, }, ZImagefileValidation { message: String, }, PipelineError { message: String, },
}
Expand description

Build-specific errors

Variants§

§

DockerfileParse

Dockerfile parsing failed

Fields

§message: String

The underlying parsing error message

§line: usize

Line number where the error occurred (1-indexed)

§

ContextRead

Failed to read build context

Fields

§path: PathBuf

Path that could not be read

§source: Error

Underlying IO error

§

PathEscape

Path escape attempt detected (security violation)

Fields

§path: PathBuf

The offending path

§

FileIgnored

File was ignored by .dockerignore

Fields

§path: PathBuf

The ignored file path

§

StageNotFound

Referenced stage not found

Fields

§name: String

The stage name or index that was referenced

§

RunFailed

RUN instruction failed

Fields

§command: String

The command that failed

§exit_code: i32

Exit code returned by the command

§

LayerCreate

Failed to create layer

Fields

§message: String

Underlying error description

§

CacheError

Cache operation failed

Fields

§message: String

Underlying cache error

§

RegistryError

Registry operation failed

Fields

§message: String

Underlying registry error

§

IoError(Error)

IO error

§

VariableExpansion(String)

Variable expansion failed

§

InvalidInstruction

Invalid instruction

Fields

§instruction: String

The instruction that was invalid

§reason: String

Reason why it was invalid

§

BuildahExecution

Buildah command execution failed

Fields

§command: String

The buildah command that failed

§exit_code: i32

Exit code from buildah

§stderr: String

Standard error output

§

ContextTooLarge

Build context too large

Fields

§size: u64

Actual size in bytes

§max: u64

Maximum allowed size

§

BaseImageNotFound

Base image not found

Fields

§image: String

The image reference that was not found

§

CircularDependency

Circular dependency in multi-stage build

Fields

§stages: Vec<String>

The stages involved in the cycle

§

BuildahNotFound

Buildah binary not found or installation failed

Fields

§message: String

Details about the failure

§

ZImagefileParse

ZImagefile YAML deserialization failed

Fields

§message: String

The underlying YAML parse error message

§

ZImagefileValidation

ZImagefile semantic validation failed

Fields

§message: String

Description of what validation rule was violated

§

PipelineError

Pipeline validation or execution error

Fields

§message: String

Description of the pipeline error

Implementations§

Source§

impl BuildError

Source

pub fn parse_error(msg: impl Into<String>, line: usize) -> Self

Create a DockerfileParse error from a message and line number

Source

pub fn context_read(path: impl Into<PathBuf>, source: Error) -> Self

Create a ContextRead error from a path and IO error

Source

pub fn path_escape(path: impl Into<PathBuf>) -> Self

Create a PathEscape error

Source

pub fn stage_not_found(name: impl Into<String>) -> Self

Create a StageNotFound error

Source

pub fn run_failed(command: impl Into<String>, exit_code: i32) -> Self

Create a RunFailed error

Source

pub fn layer_create(msg: impl Into<String>) -> Self

Create a LayerCreate error

Source

pub fn cache_error(msg: impl Into<String>) -> Self

Create a CacheError

Source

pub fn registry_error(msg: impl Into<String>) -> Self

Create a RegistryError

Source

pub fn invalid_instruction( instruction: impl Into<String>, reason: impl Into<String>, ) -> Self

Create an InvalidInstruction error

Source

pub fn buildah_execution( command: impl Into<String>, exit_code: i32, stderr: impl Into<String>, ) -> Self

Create a BuildahExecution error

Source

pub fn buildah_not_found(message: impl Into<String>) -> Self

Create a BuildahNotFound error

Source

pub fn zimagefile_parse(message: impl Into<String>) -> Self

Create a ZImagefileParse error

Source

pub fn zimagefile_validation(message: impl Into<String>) -> Self

Create a ZImagefileValidation error

Source

pub fn pipeline_error(message: impl Into<String>) -> Self

Create a PipelineError

Trait Implementations§

Source§

impl Debug for BuildError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for BuildError

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for BuildError

Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<Error> for BuildError

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> AsErrorSource for T
where T: Error + 'static,

Source§

fn as_error_source(&self) -> &(dyn Error + 'static)

For maximum effectiveness, this needs to be called as a method to benefit from Rust’s automatic dereferencing of method receivers.
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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 more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToCompactString for T
where T: Display,

Source§

impl<T> ToLine for T
where T: Display,

Source§

fn to_line(&self) -> Line<'_>

Converts the value to a Line.
Source§

impl<T> ToSpan for T
where T: Display,

Source§

fn to_span(&self) -> Span<'_>

Converts the value to a Span.
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T> ToText for T
where T: Display,

Source§

fn to_text(&self) -> Text<'_>

Converts the value to a Text.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more