docker

package
v0.0.0-...-4df877a Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2019 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateImage

func CreateImage(outputImage, digestImage string, buf *bytes.Buffer)

func WriteDockerfile

func WriteDockerfile(path string, buf *bytes.Buffer)

Types

type BuildResponse

type BuildResponse struct {
	Stream string `json:"stream"`
	Error  string `json:"error"`
}

type Config

type Config struct {
	ImageName        string
	User             string
	Password         string
	Token            string
	InsecureTLS      bool
	InsecureRegistry bool
	Timeout          time.Duration
}

type FsLayer

type FsLayer struct {
	BlobSum string
}

FsLayer represents a layer in docker image

type Image

type Image struct {
	Registry string
	Name     string
	Tag      string
	FsLayers []FsLayer
	Token    string

	Digest string
	// contains filtered or unexported fields
}

Image represents Docker image

func NewImage

func NewImage(conf *Config) (*Image, error)

NewImage parses image name which could be the ful name registry:port/name:tag or in any other shorter forms and creates docker image entity without information about layers

func (*Image) AnalyzedLayerName

func (i *Image) AnalyzedLayerName() string

func (*Image) LayerName

func (i *Image) LayerName(index int) string

func (*Image) Pull

func (i *Image) Pull() error

Pull retrieves information about layers from docker registry. It gets docker registry token if needed.

Jump to

Keyboard shortcuts

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