Expand description
Dockerfile parsing and representation
This module provides types and functions for parsing Dockerfiles into a structured representation that can be used for analysis, validation, and conversion to buildah commands.
Structs§
- AddInstruction
- ADD instruction (similar to COPY but with URL and archive support)
- ArgInstruction
- ARG instruction
- Copy
Instruction - COPY instruction
- Dockerfile
- A parsed Dockerfile
- EnvInstruction
- ENV instruction
- Expose
Instruction - EXPOSE instruction
- RunInstruction
- RUN instruction with optional
BuildKitfeatures - Stage
- A single stage in a multi-stage Dockerfile
- Variable
Context - Builder for tracking variable state during Dockerfile processing
Enums§
- Cache
Sharing - Cache sharing mode for RUN –mount=type=cache
- Dockerfile
From Target - A Dockerfile
FROMtarget. - Expose
Protocol - Protocol for EXPOSE instruction
- Healthcheck
Instruction - HEALTHCHECK instruction
- Instruction
- A single Dockerfile instruction
- RunMount
- Mount types for RUN –mount
- RunNetwork
- Network mode for RUN –network
- RunSecurity
- Security mode for RUN –security
- Shell
OrExec - Represents a command that can be in shell form or exec form
Functions§
- expand_
dockerfile - Expand Docker build-time variables across an entire
DockerfileIR. - expand_
variables - Expand variables in a string using the provided ARG and ENV maps.
- expand_
variables_ in_ list - Expands variables in a list of strings
- forward_
build_ arg_ env - Forward declared-but-unset build-args from the process environment.
- merge_
default_ cache_ mounts - Merge the build’s default cache mounts into every
RUNinstruction of aDockerfileIR, in place. - render_
dockerfile - Serialize a (presumably already variable-substituted)
DockerfileIR back to canonical Dockerfile text.