package
23.0.0-beta.1+incompatible
Repository: https://github.com/nobidev/docker-cli.git
Documentation: pkg.go.dev

# Functions

AddDockerfileToBuildContext from a ReadCloser, returns a new archive and the relative path to the dockerfile in the context.
Compress the build context for sending to the API.
DetectArchiveReader detects whether the input stream is an archive or a Dockerfile and returns a buffered version of input, safe to consume in lieu of input.
GetContextFromGitURL uses a Git URL as context for a `docker build`.
GetContextFromLocalDir uses the given local directory as context for a `docker build`.
GetContextFromReader will read the contents of the given reader as either a Dockerfile or tar archive.
GetContextFromURL uses a remote URL as context for a `docker build`.
IsArchive checks for the magic bytes of a tar or any supported compression algorithm.
ReadDockerignore reads the .dockerignore file in the context directory and returns the list of paths to exclude.
ResolveAndValidateContextPath uses the given context directory for a `docker build` and returns the absolute path to the context directory.
TrimBuildFilesFromExcludes removes the named Dockerfile and .dockerignore from the list of excluded files.
ValidateContextDirectory checks if all the contents of the directory can be read and returns an error if some files can't be read symlinks which point to non-existing files don't trigger an error.
WriteTempDockerfile writes a Dockerfile stream to a temporary file with a name specified by DefaultDockerfileName and returns the path to the temporary directory containing the Dockerfile.

# Constants

DefaultDockerfileName is the Default filename with Docker commands, read by docker build.