Skip to main content

validate_dockerfile

Function validate_dockerfile 

Source
pub fn validate_dockerfile(
    contract: &DeploymentContract,
    dockerfile_path: impl AsRef<Path>,
) -> Result<Vec<ContractMismatch>, DeploymentError>
Available on crate feature deployment only.
Expand description

Validate a Dockerfile against the deployment contract.

Checks EXPOSE port, HEALTHCHECK path, and config mount path.

Returns a list of mismatches (empty = all good).

ยงErrors

Returns DeploymentError if the Dockerfile cannot be read.