Documentation
¶
Index ¶
- Constants
- func AddDockerfileToBuildContext(dockerfileCtx io.ReadCloser, buildCtx io.ReadCloser) (io.ReadCloser, string, error)
- func Compress(buildCtx io.ReadCloser) (io.ReadCloser, error)
- func DetectArchiveReader(input io.ReadCloser) (rc io.ReadCloser, isArchive bool, err error)
- func GetContextFromGitURL(gitURL, dockerfileName string) (string, string, error)
- func GetContextFromLocalDir(localDir, dockerfileName string) (string, string, error)
- func GetContextFromReader(rc io.ReadCloser, dockerfileName string) (out io.ReadCloser, relDockerfile string, err error)
- func GetContextFromURL(out io.Writer, remoteURL, dockerfileName string) (io.ReadCloser, string, error)
- func IsArchive(header []byte) bool
- func ReadDockerignore(contextDir string) ([]string, error)
- func ResolveAndValidateContextPath(givenContextDir string) (string, error)
- func TrimBuildFilesFromExcludes(excludes []string, dockerfile string, dockerfileFromStdin bool) []string
- func ValidateContextDirectory(srcPath string, excludes []string) error
- func WriteTempDockerfile(rc io.ReadCloser) (dockerfileDir string, err error)
Constants ¶
View Source
const ( // DefaultDockerfileName is the Default filename with Docker commands, read by docker build DefaultDockerfileName string = "Dockerfile" )
Variables ¶
This section is empty.
Functions ¶
func AddDockerfileToBuildContext ¶
func AddDockerfileToBuildContext(dockerfileCtx io.ReadCloser, buildCtx io.ReadCloser) (io.ReadCloser, string, error)
AddDockerfileToBuildContext from a ReadCloser, returns a new archive and the relative path to the dockerfile in the context.
func Compress ¶
func Compress(buildCtx io.ReadCloser) (io.ReadCloser, error)
Compress the build context for sending to the API