Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GitSourceRef ¶
type GitSourceRef struct {
// URL is the Git URL as it appears in the Dockerfile (e.g., https://github.com/owner/repo.git#ref)
URL string
// Line is the line number in the Dockerfile where this reference appears
Line int
}
GitSourceRef represents a Git source reference extracted from a Dockerfile ADD instruction. BuildKit supports git URLs in ADD instructions for fetching repositories during build.
type HTTPSourceRef ¶
type HTTPSourceRef struct {
// URL is the HTTP/HTTPS URL as it appears in the Dockerfile
URL string
// Line is the line number in the Dockerfile where this reference appears
Line int
}
HTTPSourceRef represents an HTTP/HTTPS source reference extracted from a Dockerfile ADD instruction. Note: ADD instructions with --checksum flag are excluded (already pinned).
type ImageRef ¶
type ImageRef struct {
// Original is the original image reference as it appears in the Dockerfile
Original string
// Ref is the parsed and normalized reference
Ref reference.Named
// Line is the line number in the Dockerfile where this reference appears
Line int
// StageName is the build stage name if this is a named stage
StageName string
}
ImageRef represents a container image reference extracted from a Dockerfile
type ParseResult ¶
type ParseResult struct {
// Images contains all container image references (FROM and COPY --from instructions)
Images []ImageRef
// HTTPSources contains all HTTP/HTTPS source references (ADD instructions without checksum)
HTTPSources []HTTPSourceRef
// GitSources contains all Git source references (ADD instructions)
GitSources []GitSourceRef
}
ParseResult contains all extracted references from a Dockerfile
func ParseAllFile ¶
func ParseAllFile(ctx context.Context, path string) (*ParseResult, error)
ParseAllFile parses a Dockerfile and extracts all references (images and HTTP sources)
Click to show internal directories.
Click to hide internal directories.