daemonbuilder

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2018 License: Apache-2.0 Imports: 26 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, createProgressReader func(in io.ReadCloser) io.ReadCloser) (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).

func MakeBasicPod

func MakeBasicPod(podId string, config *containertypes.Config, hostConfig *containertypes.HostConfig) (*apitypes.UserPod, error)

func MakeCopyPod

func MakeCopyPod(podId string, config *containertypes.Config) (*apitypes.UserPod, error)

func MakePod

func MakePod(podId, src, shellDir string, config *containertypes.Config, cmds, entrys []string, readonlyRoot bool) (*apitypes.UserPod, error)

Types

type Docker

type Docker struct {
	*daemon.Daemon
	OutOld      io.Writer
	AuthConfigs map[string]types.AuthConfig
	Archiver    *archive.Archiver
	// contains filtered or unexported fields
}

Docker implements builder.Backend for the docker Daemon object.

func (Docker) BuilderCopy

func (d Docker) BuilderCopy(cId string, destPath string, src builder.FileInfo, decompress bool) error

BuilderCopy 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). BuilderCopy should take in abstract paths (with slashes) and the implementation should convert it to OS-specific paths.

func (Docker) Cleanup

func (d Docker) Cleanup()

func (Docker) Commit

func (d Docker) Commit(cId string, cfg *types.ContainerCommitConfig) (string, error)

func (Docker) ContainerAttach

func (d Docker) ContainerAttach(cId string, stdin io.ReadCloser, stdout, stderr io.Writer, stream bool) error

ContainerAttach attaches streams to the container cID. If stream is true, it streams the output.

func (Docker) ContainerCreate

Override the Docker ContainerCreate interface, create pod to run command

func (Docker) ContainerRm

func (d Docker) ContainerRm(name string, config *types.ContainerRmConfig) error

func (Docker) ContainerStart

func (d Docker) ContainerStart(cId string, hostConfig *containertypes.HostConfig) (err error)

func (Docker) ContainerUpdateCmd

func (d Docker) ContainerUpdateCmd(cID string, cmd []string) error

ContainerUpdateCmd updates Path and Args for the container with ID cID.

func (Docker) ContainerWait

func (d Docker) ContainerWait(cId string, timeout time.Duration) (int, error)

func (Docker) GetCachedImage

func (d Docker) GetCachedImage(imgID string, cfg *container.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) GetImage

func (d Docker) GetImage(name string) (builder.Image, error)

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

func (*Docker) InitHyper

func (d *Docker) InitHyper()

func (Docker) Pull

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

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

type Hyper

type Hyper struct {
	CopyPods  map[string]string
	BasicPods map[string]string
	Ready     chan bool
}

Jump to

Keyboard shortcuts

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