pinkerton

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

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

Go to latest
Published: Jul 29, 2016 License: BSD-3-Clause Imports: 27 Imported by: 0

README

pinkerton

pinkerton is a standalone tool for working with Docker images.

Currently it can download images and checkout working copies using the same local storage format that Docker uses.

Usage:
  pinkerton pull [options] <image-url>
  pinkerton checkout [options] <id> <image-id>
  pinkerton cleanup [options] <id>
  pinkerton -h | --help

Commands:
  pull      Download a Docker image
  checkout  Checkout a working copy of an image
  cleanup   Destroy a working copy of an image

Examples:
  pinkerton pull https://registry.hub.docker.com/redis
  pinkerton pull https://registry.hub.docker.com/ubuntu?tag=trusty
  pinkerton pull https://registry.hub.docker.com/flynn/slugrunner?id=1443bd6a675b959693a1a4021d660bebbdbff688d00c65ff057c46702e4b8933
  pinkerton checkout slugrunner-test 1443bd6a675b959693a1a4021d660bebbdbff688d00c65ff057c46702e4b8933
  pinkerton cleanup slugrunner-test

Options:
  -h, --help       show this message and exit
  --driver=<name>  storage driver [default: aufs]
  --root=<path>    storage root [default: /var/lib/docker]

Roadmap

Future features might include:

  • Repository/image/container introspection
  • Building/editing of images
  • Pushing images to Docker registries
  • Making the UI more friendly to humans
  • Parallel HTTP requests
  • Pull resumption

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoImageID = errors.New("pinkerton: missing image id")

Functions

func DockerPullPrinter

func DockerPullPrinter(out io.Writer) io.Writer

func ImageID

func ImageID(s string) (string, error)

func InfoPrinter

func InfoPrinter(jsonOut bool) chan<- layer.PullInfo

func NewTUFSession

func NewTUFSession(client *tuf.Client, ref *Ref) *tufSession

func PullImages

func PullImages(tufDB, repository, driver, root, ver string, progress chan<- layer.PullInfo) error

func PullImagesWithClient

func PullImagesWithClient(client *tuf.Client, repository, driver, root, version string, progress chan<- layer.PullInfo) error

Types

type Context

type Context struct {
	// contains filtered or unexported fields
}

func BuildContext

func BuildContext(driver, root string) (*Context, error)

func NewContext

func NewContext(store *graph.TagStore, graph *graph.Graph, driver graphdriver.Driver) *Context

func (*Context) Checkout

func (c *Context) Checkout(id, imageID string) (string, error)

func (*Context) Cleanup

func (c *Context) Cleanup(id string) error

func (*Context) PullDocker

func (c *Context) PullDocker(url string, out io.Writer) (string, error)

func (*Context) PullTUF

func (c *Context) PullTUF(url string, client *tuf.Client, progress chan<- layer.PullInfo) error

type Image

type Image struct {
	// contains filtered or unexported fields
}

func (*Image) Close

func (i *Image) Close() error

func (*Image) ID

func (i *Image) ID() string

func (*Image) MarshalConfig

func (i *Image) MarshalConfig() ([]byte, error)

func (*Image) Parent

func (i *Image) Parent() string

func (*Image) Read

func (i *Image) Read(p []byte) (int, error)

type ImageConfig

type ImageConfig struct {
	ID              string           `json:"id"`
	ParentID        string           `json:"parent,omitempty"`
	Comment         string           `json:"comment,omitempty"`
	Created         time.Time        `json:"created"`
	Container       string           `json:"container,omitempty"`
	ContainerConfig *json.RawMessage `json:"container_config,omitempty"`
	Config          *json.RawMessage `json:"config,omitempty"`
	DockerVersion   string           `json:"docker_version,omitempty"`
	Author          string           `json:"author,omitempty"`
	Architecture    string           `json:"architecture,omitempty"`
	OS              string           `json:"os,omitempty"`
	Size            int64            `json:"size,omitempty"`
}

type Ref

type Ref struct {
	// contains filtered or unexported fields
}

func NewRef

func NewRef(s string) (*Ref, error)

func (*Ref) DockerRef

func (r *Ref) DockerRef() string

func (*Ref) DockerRepo

func (r *Ref) DockerRepo() string

func (*Ref) ID

func (r *Ref) ID() string

func (*Ref) Tag

func (r *Ref) Tag() string

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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