Documentation ¶
Overview ¶
Package dockerfile provides functionality to parse a Dockerfile.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dockerfile ¶
type Dockerfile struct {
// contains filtered or unexported fields
}
Dockerfile represents a parsed Dockerfile.
func (*Dockerfile) GetExposedPorts ¶
func (df *Dockerfile) GetExposedPorts() ([]Port, error)
GetExposedPorts returns a uint16 slice of exposed ports found in the Dockerfile.
func (*Dockerfile) GetHealthCheck ¶
func (df *Dockerfile) GetHealthCheck() (*HealthCheck, error)
GetHealthCheck parses the HEALTHCHECK instruction from the Dockerfile and returns it. If the HEALTHCHECK is NONE or there is no instruction, returns nil.
type ErrInvalidPort ¶
type ErrInvalidPort struct {
Match string
}
ErrInvalidPort means that while there was a port provided, it was out of bounds or unparseable
func (ErrInvalidPort) Error ¶
func (e ErrInvalidPort) Error() string
type ErrNoExpose ¶
type ErrNoExpose struct {
Dockerfile string
}
ErrNoExpose means there were no documented EXPOSE statements in the given dockerfile.
func (ErrNoExpose) Error ¶
func (e ErrNoExpose) Error() string
type HealthCheck ¶
type HealthCheck struct { Interval time.Duration Timeout time.Duration StartPeriod time.Duration Retries int Cmd []string }
HealthCheck represents container health check options in a Dockerfile.
Click to show internal directories.
Click to hide internal directories.