daemonbuilder

package
v0.11.2-0...-2856a30 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 3, 2015 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

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) Commit

func (d Docker) Commit(name string, cfg *daemon.ContainerCommitConfig) (string, error)

Commit creates a new Docker image from an existing Docker container.

func (Docker) Container

func (d Docker) Container(id string) (*container.Container, error)

Container looks up a Docker container referenced by `id`.

func (Docker) Copy

func (d Docker) Copy(c *container.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) (*container.Container, []string, error)

Create creates a new Docker container and returns potential warnings

func (Docker) GetCachedImage

func (d Docker) GetCachedImage(imgID string, cfg *runconfig.Config) (string, error)

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) Kill

func (d Docker) Kill(container *container.Container) error

Kill stops the container execution abruptly.

func (Docker) LookupImage

func (d Docker) LookupImage(name string) (*image.Image, error)

LookupImage looks up a Docker image referenced by `name`.

func (Docker) Mount

func (d Docker) Mount(c *container.Container) error

Mount mounts the root filesystem for the container.

func (Docker) Pull

func (d Docker) Pull(name string) (*image.Image, error)

Pull tells Docker to pull image referenced by `name`.

func (Docker) Release

func (d Docker) Release(sessionID string, activeImages []string)

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

func (d Docker) Retain(sessionID, imgID string)

Retain retains an image avoiding it to be removed or overwritten until a corresponding Release() call.

func (Docker) Start

func (d Docker) Start(c *container.Container) error

Start starts a container

func (Docker) Unmount

func (d Docker) Unmount(c *container.Container) error

Unmount unmounts the root filesystem for the container.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL