package remotecontext
import "github.com/dotcloud/docker/builder/remotecontext"
Index ¶
- Constants
- func Detect(config backend.BuildConfig) (remote builder.Source, dockerfile *parser.Result, _ error)
- func FromArchive(tarStream io.Reader) (builder.Source, error)
- func FullPath(remote builder.Source, path string) (string, error)
- func GetWithStatusError(address string) (resp *http.Response, err error)
- func MakeGitContext(gitURL string) (builder.Source, error)
- func NewFileHash(path, name string, fi os.FileInfo) (hash.Hash, error)
- func NewLazySource(root string) (builder.Source, error)
- func Rel(basepath string, targpath string) (string, error)
- func StatAt(remote builder.Source, path string) (os.FileInfo, error)
Constants ¶
const ClientSessionRemote = "client-session"
ClientSessionRemote is identifier for client-session context transport
Functions ¶
func Detect ¶
Detect returns a context and dockerfile from remote location or local archive.
func FromArchive ¶
FromArchive returns a build source from a tar stream.
It extracts the tar stream to a temporary folder that is deleted as soon as the Context is closed. As the extraction happens, a tarsum is calculated for every file, and the set of all those sums then becomes the source of truth for all operations on this Context.
Closing tarStream has to be done by the caller.
func FullPath ¶
FullPath is a helper for getting a full path for a path from a source
func GetWithStatusError ¶
GetWithStatusError does an http.Get() and returns an error if the status code is 4xx or 5xx.
func MakeGitContext ¶
MakeGitContext returns a Context from gitURL that is cloned in a temporary directory.
func NewFileHash ¶
NewFileHash returns new hash that is used for the builder cache keys
func NewLazySource ¶
NewLazySource creates a new LazyContext. LazyContext defines a hashed build context based on a root directory. Individual files are hashed first time they are asked. It is not safe to call methods of LazyContext concurrently.
func Rel ¶
Rel makes a path relative to base path. Same as `filepath.Rel` but can also handle UUID paths in windows.
func StatAt ¶
StatAt is a helper for calling Stat on a path from a source
Source Files ¶
archive.go detect.go filehash.go git.go lazycontext.go mimetype.go remote.go
Directories ¶
Path | Synopsis |
---|---|
builder/remotecontext/git | |
builder/remotecontext/urlutil | Package urlutil provides helper function to check if a given build-context location should be considered a URL or a remote Git repository. |
- Version
- v28.1.1+incompatible (latest)
- Published
- Apr 18, 2025
- Platform
- linux/amd64
- Imports
- 38 packages
- Last checked
- 2 hours ago –
Tools for package owners.