Versions in this module Expand all Collapse all v0 v0.19.3 Oct 23, 2025 v0.19.0 Sep 30, 2025 Changes in this version + func HasStage(s []Stage, name string) (int, bool) + func IsCurrentStage(s []Stage, name string) bool + func Parse(ast *parser.Node, lint *linter.Linter) (stages []Stage, metaArgs []ArgCommand, err error) + func ParseInstruction(node *parser.Node) (v interface{}, err error) + func ParseInstructionWithLinter(node *parser.Node, lint *linter.Linter) (v interface{}, err error) + type AddCommand struct + Checksum string + Chmod string + Chown string + ExcludePatterns []string + KeepGitDir bool + Link bool + func (c *AddCommand) Expand(expander SingleWordExpander) error + func (c *AddCommand) Location() []parser.Range + func (c *AddCommand) Name() string + func (c *AddCommand) String() string + type ArgCommand struct + Args []KeyValuePairOptional + func (c *ArgCommand) Expand(expander SingleWordExpander) error + func (c *ArgCommand) Location() []parser.Range + func (c *ArgCommand) Name() string + func (c *ArgCommand) String() string + type BFlags struct + Args []string + Err error + func NewBFlags() *BFlags + func NewBFlagsWithArgs(args []string) *BFlags + func (bf *BFlags) AddBool(name string, def bool) *Flag + func (bf *BFlags) AddString(name string, def string) *Flag + func (bf *BFlags) AddStrings(name string) *Flag + func (bf *BFlags) Parse() error + func (bf *BFlags) Used() []string + type CmdCommand struct + func (c *CmdCommand) Location() []parser.Range + func (c *CmdCommand) Name() string + func (c *CmdCommand) String() string + type Command interface + Location func() []parser.Range + Name func() string + func ParseCommand(node *parser.Node) (Command, error) + type CopyCommand struct + Chmod string + Chown string + ExcludePatterns []string + From string + Link bool + Parents bool + func (c *CopyCommand) Expand(expander SingleWordExpander) error + func (c *CopyCommand) Location() []parser.Range + func (c *CopyCommand) Name() string + func (c *CopyCommand) String() string + type EntrypointCommand struct + func (c *EntrypointCommand) Location() []parser.Range + func (c *EntrypointCommand) Name() string + func (c *EntrypointCommand) String() string + type EnvCommand struct + Env KeyValuePairs + func (c *EnvCommand) Expand(expander SingleWordExpander) error + func (c *EnvCommand) Location() []parser.Range + func (c *EnvCommand) Name() string + func (c *EnvCommand) String() string + type ExposeCommand struct + Ports []string + func (c *ExposeCommand) Location() []parser.Range + func (c *ExposeCommand) Name() string + func (c *ExposeCommand) String() string + type Flag struct + StringValues []string + Value string + func (fl *Flag) IsTrue() bool + func (fl *Flag) IsUsed() bool + type FlagType int + type HealthCheckCommand struct + Health *dockerspec.HealthcheckConfig + func (c *HealthCheckCommand) Location() []parser.Range + func (c *HealthCheckCommand) Name() string + func (c *HealthCheckCommand) String() string + type KeyValuePair struct + Key string + NoDelim bool + Value string + func (kvp *KeyValuePair) String() string + type KeyValuePairOptional struct + Comment string + Key string + Value *string + func (kvpo *KeyValuePairOptional) String() string + func (kvpo *KeyValuePairOptional) ValueString() string + type KeyValuePairs []KeyValuePair + type LabelCommand struct + Labels KeyValuePairs + func NewLabelCommand(k string, v string, noExp bool) *LabelCommand + func (c *LabelCommand) Expand(expander SingleWordExpander) error + func (c *LabelCommand) Location() []parser.Range + func (c *LabelCommand) Name() string + func (c *LabelCommand) String() string + type MaintainerCommand struct + Maintainer string + func (c *MaintainerCommand) Location() []parser.Range + func (c *MaintainerCommand) Name() string + func (c *MaintainerCommand) String() string + type Mount struct + CacheID string + CacheSharing ShareMode + Env *string + From string + GID *uint64 + Mode *uint64 + ReadOnly bool + Required bool + SizeLimit int64 + Source string + Target string + Type MountType + UID *uint64 + func GetMounts(cmd *RunCommand) []*Mount + type MountType string + const MountTypeBind + const MountTypeCache + const MountTypeSSH + const MountTypeSecret + const MountTypeTmpfs + type NetworkMode = string + const NetworkDefault + const NetworkHost + const NetworkNone + func GetNetwork(cmd *RunCommand) NetworkMode + type OnbuildCommand struct + Expression string + func (c *OnbuildCommand) Location() []parser.Range + func (c *OnbuildCommand) Name() string + func (c *OnbuildCommand) String() string + type PlatformSpecific interface + CheckPlatform func(platform string) error + type RunCommand struct + FlagsUsed []string + func (c *RunCommand) Expand(expander SingleWordExpander) error + func (c *RunCommand) Location() []parser.Range + func (c *RunCommand) Name() string + func (c *RunCommand) String() string + type ShareMode string + const MountSharingLocked + const MountSharingPrivate + const MountSharingShared + type ShellCommand struct + Shell []string + func (c *ShellCommand) Location() []parser.Range + func (c *ShellCommand) Name() string + func (c *ShellCommand) String() string + type ShellDependantCmdLine struct + CmdLine []string + Files []ShellInlineFile + PrependShell bool + type ShellInlineFile struct + Chomp bool + Data string + Name string + type SingleWordExpander func(word string) (string, error) + type SourceContent struct + Data string + Expand bool + Path string + type SourcesAndDest struct + DestPath string + SourceContents []SourceContent + SourcePaths []string + func (s *SourcesAndDest) Expand(expander SingleWordExpander) error + func (s *SourcesAndDest) ExpandRaw(expander SingleWordExpander) error + type Stage struct + BaseName string + Commands []Command + Comment string + Location []parser.Range + Name string + OrigCmd string + Platform string + SourceCode string + func CurrentStage(s []Stage) (*Stage, error) + func (s *Stage) AddCommand(cmd Command) + type StopSignalCommand struct + Signal string + func (c *StopSignalCommand) CheckPlatform(platform string) error + func (c *StopSignalCommand) Expand(expander SingleWordExpander) error + func (c *StopSignalCommand) Location() []parser.Range + func (c *StopSignalCommand) Name() string + func (c *StopSignalCommand) String() string + type SupportsSingleWordExpansion interface + Expand func(expander SingleWordExpander) error + type SupportsSingleWordExpansionRaw interface + ExpandRaw func(expander SingleWordExpander) error + type UnknownInstructionError struct + Instruction string + Line int + func (e *UnknownInstructionError) Error() string + type UserCommand struct + User string + func (c *UserCommand) Expand(expander SingleWordExpander) error + func (c *UserCommand) Location() []parser.Range + func (c *UserCommand) Name() string + func (c *UserCommand) String() string + type VolumeCommand struct + Volumes []string + func (c *VolumeCommand) Expand(expander SingleWordExpander) error + func (c *VolumeCommand) Location() []parser.Range + func (c *VolumeCommand) Name() string + func (c *VolumeCommand) String() string + type WorkdirCommand struct + Path string + func (c *WorkdirCommand) Expand(expander SingleWordExpander) error + func (c *WorkdirCommand) Location() []parser.Range + func (c *WorkdirCommand) Name() string + func (c *WorkdirCommand) String() string