Skip to main content

apply

Function apply 

Source
pub fn apply<E: DockerfileEnvironment>(
    args: &DockerfileArgs,
    env: &E,
) -> Result<DockerfileGraph, SpecError>
Expand description

Parse + content-address a Dockerfile into its typed DockerfileGraph.

§Errors

  • SpecError::Interp { phase: "read-dockerfile" } if the environment couldn’t read the file.
  • SpecError::Interp { phase: "parse-line" } for a line this scoped parser can’t classify, or a malformed instruction (e.g. COPY with no destination).
  • SpecError::Interp { phase: "unresolved-arg-reference" } if a RUN/ENV/CMD/… body references $SOME_ARG and neither the environment nor the ARG’s own default resolves it.