package daemonbuilder
import "github.com/docker/docker/daemon/daemonbuilder"
Index ¶
- func DetectContextFromRemoteURL(r io.ReadCloser, remoteURL string, progressReader *progressreader.Config) (context builder.ModifiableContext, dockerfileName string, err error)
- type Docker
- func (d Docker) Commit(c *daemon.Container, cfg *daemon.ContainerCommitConfig) (*image.Image, 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) LookupImage(name string) (*image.Image, 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)
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) Commit ¶
func (d Docker) Commit(c *daemon.Container, cfg *daemon.ContainerCommitConfig) (*image.Image, error)
Commit creates a new Docker image from an existing Docker container.
func (Docker) Container ¶
Container looks up a Docker container referenced by `id`.
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) Pull ¶
Pull tells Docker to pull 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`.
func (Docker) Retain ¶
Retain retains an image avoiding it to be removed or overwritten until a corresponding Release() call.
Source Files ¶
- Version
- v1.9.0-rc2
- Published
- Oct 22, 2015
- Platform
- js/wasm
- Imports
- 22 packages
- Last checked
- 20 minutes ago –
Tools for package owners.