Documentation
¶
Overview ¶
Parse a dockerfile into a high-level representation using the official go parser
Index ¶
- Constants
- func AirflowCommand(id string, airflowCommand string) string
- func AllCmds() []string
- func Exec(args ...string) error
- func ExecLogin(serverAddress, username, token string) error
- func ExecPush(serverAddress, token, image string) error
- func GetImageTagFromParsedFile(cmds []Command) (baseImage, tag string)
- type Command
- type IOError
- type ParseError
Constants ¶
View Source
const (
// Docker is the docker command.
Docker = "docker"
)
Variables ¶
This section is empty.
Functions ¶
func AirflowCommand ¶ added in v0.8.0
AirflowCommand is the main method of interaction with Airflow
func ExecPush ¶ added in v0.9.1
ExecPush does push image to registry using native docker client, instead of using `docker push` in bash
func GetImageTagFromParsedFile ¶ added in v0.11.0
Parse tag from parsed dockerfile: e.g. FROM ubuntu:xenial returns "ubuntu", "xenial"
Types ¶
type Command ¶ added in v0.11.0
type Command struct {
Cmd string // lower cased command name (ex: `from`)
SubCmd string // for ONBUILD only this holds the sub-command
Json bool // whether the value is written in json form
Original string // The original source line
StartLine int // The original source line number which starts this command
EndLine int // The original source line number which ends this command
Flags []string // Any flags such as `--from=...` for `COPY`.
Value []string // The contents of the command (ex: `ubuntu:xenial`)
}
Represents a single line (layer) in a Dockerfile. For example `FROM ubuntu:xenial`
type IOError ¶ added in v0.11.0
type IOError struct {
Msg string
}
A failure in opening a file for reading.
type ParseError ¶ added in v0.11.0
type ParseError struct {
Msg string
}
A failure in parsing the file as a dockerfile.
func (ParseError) Error ¶ added in v0.11.0
func (e ParseError) Error() string
Click to show internal directories.
Click to hide internal directories.