docker

package
v0.3.10 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2018 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Ext string = ".docker.tar"
)

Variables

This section is empty.

Functions

func FilePathToImageName

func FilePathToImageName(fileName string) (imageName string, err error)

FileNameToImageName converts an archived file name back to the origonal docker image name

func GetAuth

func GetAuth(image string) string

GetAuth loads config for a given registry from the Docker config file

func GetAuthString added in v0.3.8

func GetAuthString(image, username, password string) (string, error)

GetAuthString will return a valid auth string from credentials

func GetNewImageName added in v0.3.3

func GetNewImageName(image string, registry string) string

func ImageToFilePath

func ImageToFilePath(imageName string, dir string) (fileName string, err error)

ImageToFileName provides an archived name from a docker image name

func Load

func Load(file string) error

Load a conatiner from archive and return the image name

func Push

func Push(image string, creds *util.Creds) error

Push will push a docker image

func ReTag

func ReTag(image Image) error

func Save

func Save(c *hashcache.CheckSumCache, image string, dir string, creds *util.Creds) error

Save will save a docker image

Types

type Image

type Image struct {
	FileName     string
	ImageName    string
	NewImageName string
}

func GetImages

func GetImages(path string, registry string) ([]Image, error)

GetImages retireves a list of image structs

type PushEvent

type PushEvent struct {
	Status         string `json:"status"`
	Error          string `json:"error"`
	Progress       string `json:"progress"`
	ProgressDetail struct {
		Current int `json:"current"`
		Total   int `json:"total"`
	} `json:"progressDetail"`
	Id string `json:"id"`
}

type SaveEvent

type SaveEvent struct {
	Status         string `json:"status"`
	Error          string `json:"error"`
	Progress       string `json:"progress"`
	ProgressDetail struct {
		Current int `json:"current"`
		Total   int `json:"total"`
	} `json:"progressDetail"`
	Id string `json:"id"`
}

Jump to

Keyboard shortcuts

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