spec

package
v0.0.0-...-1bc8c79 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 2, 2026 License: Apache-2.0 Imports: 1 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package spec describes the Dockerfile data model.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BuildStage

type BuildStage struct {
	Index     int         `json:"index"`
	StartLine int         `json:"start_line"`
	EndLine   int         `json:"end_line"`
	Name      string      `json:"name,omitempty"`
	Parent    ParentImage `json:"parent"`

	AllInstructions           []*instruction.Field            `json:"-"`
	CurrentInstructions       []*instruction.Field            `json:"-"`
	OnBuildInstructions       []*instruction.Field            `json:"-"`
	UnknownInstructions       []*instruction.Field            `json:"-"`
	InvalidInstructions       []*instruction.Field            `json:"-"` //not including unknown instructions
	CurrentInstructionsByType map[string][]*instruction.Field `json:"-"`
	FromInstruction           *instruction.Field              `json:"-"`
	ArgInstructions           []*instruction.Field            `json:"-"`
	EnvInstructions           []*instruction.Field            `json:"-"`

	EnvVars            map[string]string      `json:"-"`
	BuildArgs          map[string]string      `json:"-"`
	FromArgs           map[string]string      `json:"-"` //"FROM" ARGs used by the stage
	UnknownFromArgs    map[string]struct{}    `json:"-"`
	IsUsed             bool                   `json:"-"`
	StageReferences    map[string]*BuildStage `json:"-"`
	ExternalReferences map[string]struct{}    `json:"-"`
}

func NewBuildStage

func NewBuildStage() *BuildStage

type Dockerfile

type Dockerfile struct {
	Name                  string
	Location              string
	Lines                 []string
	FromArgs              map[string]string //all "FROM" ARGs
	Stages                []*BuildStage
	StagesByName          map[string]*BuildStage
	LastStage             *BuildStage
	StagelessInstructions []*instruction.Field
	ArgInstructions       []*instruction.Field
	AllInstructions       []*instruction.Field
	InstructionsByType    map[string][]*instruction.Field
	UnknownInstructions   []*instruction.Field
	InvalidInstructions   []*instruction.Field //not including unknown instructions
	Warnings              []string
}

func NewDockerfile

func NewDockerfile() *Dockerfile

type ParentImage

type ParentImage struct {
	Name           string      `json:"name,omitempty"`
	Tag            string      `json:"tag,omitempty"`
	Digest         string      `json:"digest,omitempty"`
	BuildArgAll    string      `json:"-"`
	BuildArgName   string      `json:"-"`
	BuildArgTag    string      `json:"-"`
	BuildArgDigest string      `json:"-"`
	HasEmptyName   bool        `json:"-"`
	HasEmptyTag    bool        `json:"-"`
	HasEmptyDigest bool        `json:"-"`
	ParentStage    *BuildStage `json:"-"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL