Documentation ¶
Index ¶
- func DigestReference(ref string) bool
- func DockerInitPath(localCopy string) string
- func ExperimentalBuild() bool
- func GetCallerName(depth int) string
- func GitClone(remoteURL string) (string, error)
- func ImageReference(repo, ref string) string
- func ReadDockerIgnore(path string) ([]string, error)
- func ReplaceOrAppendEnvValues(defaults, overrides []string) []string
- func SelfPath() string
- func TestDirectory(templateDir string) (dir string, err error)
- func ValidateContextDirectory(srcPath string, excludes []string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DigestReference ¶ added in v0.3.0
DigestReference returns true if ref is a digest reference; i.e. if it is of the form <algorithm>:<digest>.
func DockerInitPath ¶
DockerInitPath figures out the path of our dockerinit (which may be SelfPath())
func ExperimentalBuild ¶ added in v0.4.0
func ExperimentalBuild() bool
ExperimentalBuild is a stub which always returns false for builds that do not include the "experimental" build tag
func GetCallerName ¶
GetCallerName introspects the call stack and returns the name of the function `depth` levels down in the stack.
func GitClone ¶ added in v0.4.0
GitClone clones a repository into a newly created directory which will be under "docker-build-git"
func ImageReference ¶ added in v0.3.0
ImageReference combines `repo` and `ref` and returns a string representing the combination. If `ref` is a digest (meaning it's of the form <algorithm>:<digest>, the returned string is <repo>@<ref>. Otherwise, ref is assumed to be a tag, and the returned string is <repo>:<tag>.
func ReadDockerIgnore ¶
ReadDockerIgnore reads a .dockerignore file and returns the list of file patterns to ignore. Note this will trim whitespace from each line as well as use GO's "clean" func to get the shortest/cleanest path for each.
func ReplaceOrAppendEnvValues ¶
ReplaceOrAppendEnvValues returns the defaults with the overrides either replaced by env key or appended to the list
func SelfPath ¶
func SelfPath() string
SelfPath figures out the absolute path of our own binary (if it's still around).
func TestDirectory ¶
TestDirectory creates a new temporary directory and returns its path. The contents of directory at path `templateDir` is copied into the new directory.
Types ¶
This section is empty.