dockercommon

package
v0.0.0-...-1b7c243 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2017 License: BSD-3-Clause Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	JsonFileLogDriver = "json-file"
)

Variables

This section is empty.

Functions

func AddDeployTarFile

func AddDeployTarFile(archive io.Reader, fileSize int64, name string) io.ReadCloser

func ArchiveBuildCmds

func ArchiveBuildCmds(app provision.App, archiveURL string) []string

ArchiveBuildCmds build a image using the archive method.

func ArchiveDeployCmds

func ArchiveDeployCmds(app provision.App, archiveURL string) []string

ArchiveDeployCmds is a legacy command to deploys an unit using the archive method.

func DeployCmds

func DeployCmds(app provision.App) []string

DeployCmds deploys an unit builded by tsuru.

func DownloadFromContainer

func DownloadFromContainer(client Client, contID string, filePath string) (io.ReadCloser, error)

func LeanContainerCmds

func LeanContainerCmds(processName, imageID string, app provision.App) ([]string, string, error)

func LeanContainerCmdsWithExtra

func LeanContainerCmdsWithExtra(processName, imageID string, app provision.App, extraCmds []string) ([]string, string, error)

func PrepareImageForDeploy

func PrepareImageForDeploy(args PrepareImageArgs) (string, error)

func ProcessCmdForImage

func ProcessCmdForImage(processName, imageID string) ([]string, string, error)

func PushImage

func PushImage(client Client, name, tag string, authconfig docker.AuthConfiguration) error

func RegistryAuthConfig

func RegistryAuthConfig() docker.AuthConfiguration

func UserForContainer

func UserForContainer() (username string, uid *int64)

func WaitDocker

func WaitDocker(client *docker.Client) error

Types

type Client

type Client interface {
	PushImage(docker.PushImageOptions, docker.AuthConfiguration) error
	InspectImage(string) (*docker.Image, error)
	TagImage(string, docker.TagImageOptions) error
	CommitContainer(docker.CommitContainerOptions) (*docker.Image, error)
	DownloadFromContainer(string, docker.DownloadFromContainerOptions) error
}

type ClientWithTimeout

type ClientWithTimeout struct {
	*docker.Client
}

func (*ClientWithTimeout) SetTimeout

func (c *ClientWithTimeout) SetTimeout(timeout time.Duration)

type PrepareImageArgs

type PrepareImageArgs struct {
	Client      Client
	App         provision.App
	ProcfileRaw string
	ImageID     string
	Out         io.Writer
}

Jump to

Keyboard shortcuts

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