Documentation ¶
Index ¶
- func DetectContextFromRemoteURL(r io.ReadCloser, remoteURL string, progressReader *progressreader.Config) (context builder.ModifiableContext, dockerfileName string, err error)
- type Docker
- func (d Docker) Commit(name string, cfg *daemon.ContainerCommitConfig) (string, error)
- func (d Docker) Container(id string) (*daemon.Container, error)
- func (d Docker) Copy(c *daemon.Container, destPath string, src builder.FileInfo, decompress bool) error
- func (d Docker) Create(cfg *runconfig.Config, hostCfg *runconfig.HostConfig) (*daemon.Container, []string, error)
- func (d Docker) GetCachedImage(imgID string, cfg *runconfig.Config) (string, error)
- func (d Docker) Kill(container *daemon.Container) error
- func (d Docker) LookupImage(name string) (*image.Image, error)
- func (d Docker) Mount(c *daemon.Container) error
- func (d Docker) Pull(name string) (*image.Image, error)
- func (d Docker) Release(sessionID string, activeImages []string)
- func (d Docker) Remove(id string, cfg *daemon.ContainerRmConfig) error
- func (d Docker) Retain(sessionID, imgID string)
- func (d Docker) Start(c *daemon.Container) error
- func (d Docker) Unmount(c *daemon.Container) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DetectContextFromRemoteURL ¶
func DetectContextFromRemoteURL(r io.ReadCloser, remoteURL string, progressReader *progressreader.Config) (context builder.ModifiableContext, dockerfileName string, err error)
DetectContextFromRemoteURL returns a context and in certain cases the name of the dockerfile to be used irrespective of user input. progressReader is only used if remoteURL is actually a URL (not empty, and not a Git endpoint).
Types ¶
type Docker ¶
type Docker struct { Daemon *daemon.Daemon OutOld io.Writer AuthConfigs map[string]cliconfig.AuthConfig Archiver *archive.Archiver }
Docker implements builder.Docker for the docker Daemon object.
func (Docker) Copy ¶
func (d Docker) Copy(c *daemon.Container, destPath string, src builder.FileInfo, decompress bool) error
Copy copies/extracts a source FileInfo to a destination path inside a container specified by a container object. TODO: make sure callers don't unnecessarily convert destPath with filepath.FromSlash (Copy does it already). Copy should take in abstract paths (with slashes) and the implementation should convert it to OS-specific paths.
func (Docker) Create ¶
func (d Docker) Create(cfg *runconfig.Config, hostCfg *runconfig.HostConfig) (*daemon.Container, []string, error)
Create creates a new Docker container and returns potential warnings
func (Docker) GetCachedImage ¶
GetCachedImage returns a reference to a cached image whose parent equals `parent` and runconfig equals `cfg`. A cache miss is expected to return an empty ID and a nil error.
func (Docker) LookupImage ¶
LookupImage looks up a Docker image referenced by `name`.
func (Docker) Release ¶
Release releases a list of images that were retained for the time of a build.
func (Docker) Remove ¶
func (d Docker) Remove(id string, cfg *daemon.ContainerRmConfig) error
Remove removes a container specified by `id`.