Documentation
¶
Index ¶
- type AddDirective
- type ArgDirective
- type CmdDirective
- type CopyDirective
- type Directive
- type EntrypointDirective
- type EnvDirective
- type ExposeDirective
- type FromDirective
- type HealthcheckDirective
- type LabelDirective
- type MaintainerDirective
- type RunDirective
- type Stage
- type Stages
- type StopsignalDirective
- type UserDirective
- type VolumeDirective
- type WorkdirDirective
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddDirective ¶
type AddDirective struct {
// contains filtered or unexported fields
}
AddDirective represents the "ADD" dockerfile command.
func AddDirectiveFixture ¶
func AddDirectiveFixture(args, chown string, srcs []string, dst string) *AddDirective
AddDirectiveFixture returns an AddDirective for testing purposes.
type ArgDirective ¶ added in v0.1.2
type ArgDirective struct {
Name string
DefaultVal string
ResolvedVal *string
// contains filtered or unexported fields
}
ArgDirective represents the "ARG" dockerfile command.
type CmdDirective ¶
type CmdDirective struct {
Cmd []string
// contains filtered or unexported fields
}
CmdDirective represents the "CMD" dockerfile command.
func CmdDirectiveFixture ¶
func CmdDirectiveFixture(args string, cmd []string) *CmdDirective
CmdDirectiveFixture returns a CmdDirective for testing purposes.
type CopyDirective ¶
type CopyDirective struct {
FromStage string
// contains filtered or unexported fields
}
CopyDirective represents the "COPY" dockerfile command.
func CopyDirectiveFixture ¶
func CopyDirectiveFixture(args, chown, fromStage string, srcs []string, dst string) *CopyDirective
CopyDirectiveFixture returns a CopyDirective for testing purposes.
type Directive ¶
type Directive interface {
// contains filtered or unexported methods
}
Directive defines a directive parsed from a line from a Dockerfile.
type EntrypointDirective ¶
type EntrypointDirective struct {
Entrypoint []string
// contains filtered or unexported fields
}
EntrypointDirective represents the "ENTRYPOINT" dockerfile command.
func EntrypointDirectiveFixture ¶
func EntrypointDirectiveFixture(args string, entrypoint []string) *EntrypointDirective
EntrypointDirectiveFixture returns a EntrypointDirective for testing purposes.
type EnvDirective ¶
EnvDirective represents the "ENV" dockerfile command.
func EnvDirectiveFixture ¶
func EnvDirectiveFixture(args string, envs map[string]string) *EnvDirective
EnvDirectiveFixture returns a EnvDirective for testing purposes.
type ExposeDirective ¶
type ExposeDirective struct {
Ports []string
// contains filtered or unexported fields
}
ExposeDirective represents the "EXPOSE" dockerfile command.
func ExposeDirectiveFixture ¶
func ExposeDirectiveFixture(args string, ports []string) *ExposeDirective
ExposeDirectiveFixture returns a ExposeDirective for testing purposes.
type FromDirective ¶
FromDirective represents the "FROM" dockerfile command.
func FromDirectiveFixture ¶
func FromDirectiveFixture(args, image, alias string) *FromDirective
FromDirectiveFixture returns a FromDirective for testing purposes.
type HealthcheckDirective ¶ added in v0.1.3
type HealthcheckDirective struct {
Interval time.Duration
Timeout time.Duration
StartPeriod time.Duration
Retries int
Test []string
// contains filtered or unexported fields
}
HeathcheckDirective represents the "LABEL" dockerfile command.
type LabelDirective ¶
LabelDirective represents the "LABEL" dockerfile command.
func LabelDirectiveFixture ¶
func LabelDirectiveFixture(args string, labels map[string]string) *LabelDirective
LabelDirectiveFixture returns a LabelDirective for testing purposes.
type MaintainerDirective ¶
type MaintainerDirective struct {
Author string
// contains filtered or unexported fields
}
MaintainerDirective represents the "MAINTAINER" dockerfile command.
type RunDirective ¶
type RunDirective struct {
Cmd string
// contains filtered or unexported fields
}
RunDirective represents the "RUN" dockerfile command.
func RunCommitDirectiveFixture ¶
func RunCommitDirectiveFixture(args string, cmd string) *RunDirective
RunCommitDirectiveFixture returns a RunDirective with a commit annotation for testing purposes.
func RunDirectiveFixture ¶
func RunDirectiveFixture(args string, cmd string) *RunDirective
RunDirectiveFixture returns a RunDirective for testing purposes.
type Stage ¶
type Stage struct {
From *FromDirective
Directives []Directive
}
Stage represents a parsed dockerfile stage.
type StopsignalDirective ¶ added in v0.1.1
type StopsignalDirective struct {
Signal int
// contains filtered or unexported fields
}
StopsignalDirective represents the "STOPSIGNAL" dockerfile command.
type UserDirective ¶
type UserDirective struct {
User string
// contains filtered or unexported fields
}
UserDirective represents the "USER" dockerfile command.
func UserDirectiveFixture ¶
func UserDirectiveFixture(args, user string) *UserDirective
UserDirectiveFixture returns a UserDirective for testing purposes.
type VolumeDirective ¶
type VolumeDirective struct {
Volumes []string
// contains filtered or unexported fields
}
VolumeDirective represents the "VOLUME" dockerfile command.
func VolumeDirectiveFixture ¶
func VolumeDirectiveFixture(args string, volumes []string) *VolumeDirective
VolumeDirectiveFixture returns a VolumeDirective for testing purposes.
type WorkdirDirective ¶
type WorkdirDirective struct {
WorkingDir string
// contains filtered or unexported fields
}
WorkdirDirective represents the "WORKDIR" dockerfile command.
func WorkdirDirectiveFixture ¶
func WorkdirDirectiveFixture(args string, workdir string) *WorkdirDirective
WorkdirDirectiveFixture returns a WorkdirDirective for testing purposes.