Documentation
¶
Overview ¶
Package dockerfrom reads the structure of a Dockerfile that container curation needs: each stage's FROM (as written and with ARG defaults applied), which stage is the final one, and the package-manager install lines in each stage's RUN instructions, with their line numbers.
It is not a Dockerfile interpreter. Build arguments passed on the command line are unknown, so a FROM that depends on an ARG without a default is reported as unresolved rather than guessed.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Package ¶
type Package struct {
Name string
// Spec is the argument as written (curl=8.5.0-r0) when it pins a version.
Spec string
}
Package is a package as the command wrote it.
type Stage ¶
type Stage struct {
Index int
// Name is the AS alias, lowercased as Docker treats it.
Name string
Line int
RawRef string
// ResolvedRef has ARG defaults applied; empty when the stage starts from an
// earlier stage or an ARG has no default.
ResolvedRef string
FromStage string
Platform string
IsFinal bool
UnresolvedArgs bool
Installs []Install
}
Stage is one FROM and what follows it until the next.