dockerfile

package
v0.0.0-...-518b544 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2024 License: Apache-2.0 Imports: 9 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Parse

func Parse(f string, opts ...Option) (builder.Args, error)

Parse parses the provided Dockerfile with the given args

Types

type Command

type Command struct {
	Cmd       string   // lowercased 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`)
}

Command represents a single line (layer) in a Dockerfile. For example `FROM ubuntu:xenial`

type Option

type Option func(*options) error

Option is a functional option for remote operations.

func BaseDir

func BaseDir(dir string) Option

BaseDir is the directory that files are copied relative to. If not set, the base directory of the Dockerfile is used.

func IgnoreRuns

func IgnoreRuns() Option

IgnoreRuns tells the parser to ignore RUN statements rather than failing

func WithArgs

func WithArgs(a map[string]string) Option

WithArgs sets the input args to the dockerfile

Jump to

Keyboard shortcuts

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