pack

package module
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2020 License: Apache-2.0 Imports: 34 Imported by: 7

README

pack - Buildpack CLI

Travis Build Status Go Report Card GoDoc GitHub license Slack

pack makes it easy for...

  • App Developers to use buildpacks to convert code into runnable images.
  • Buildpack Authors to develop and package buildpacks for distribution.
  • Operators to package buildpacks for distribution and maintain applications.

pack is a CLI implementation of the Platform Interface Specification for Cloud Native Buildpacks.

Usage

Contributing

For information on how to contribute to this project including its development process see CONTRIBUTING.md.

Resources

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BuildOptions added in v0.6.0

type BuildOptions struct {
	Image             string              // required
	Builder           string              // required
	AppPath           string              // defaults to current working directory
	RunImage          string              // defaults to the best mirror from the builder metadata or AdditionalMirrors
	AdditionalMirrors map[string][]string // only considered if RunImage is not provided
	Env               map[string]string
	Publish           bool
	NoPull            bool
	ClearCache        bool
	Buildpacks        []string
	ProxyConfig       *ProxyConfig // defaults to  environment proxy vars
	ContainerConfig   ContainerConfig
}

type BuilderInfo added in v0.6.0

type BuilderInfo struct {
	Description     string
	Stack           string
	Mixins          []string
	RunImage        string
	RunImageMirrors []string
	Buildpacks      []builder.BuildpackMetadata
	Order           dist.Order
	Lifecycle       builder.LifecycleDescriptor
	CreatedBy       builder.CreatorMetadata
}

type BuildpackInfo added in v0.6.0

type BuildpackInfo struct {
	ID      string
	Version string
}

type Client added in v0.6.0

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

func NewClient added in v0.6.0

func NewClient(opts ...ClientOption) (*Client, error)

func (*Client) Build added in v0.6.0

func (c *Client) Build(ctx context.Context, opts BuildOptions) error

func (*Client) CreateBuilder added in v0.6.0

func (c *Client) CreateBuilder(ctx context.Context, opts CreateBuilderOptions) error

func (*Client) CreatePackage added in v0.6.0

func (c *Client) CreatePackage(ctx context.Context, opts CreatePackageOptions) error

func (*Client) InspectBuilder added in v0.6.0

func (c *Client) InspectBuilder(name string, daemon bool) (*BuilderInfo, error)

func (*Client) InspectImage added in v0.6.0

func (c *Client) InspectImage(name string, daemon bool) (*ImageInfo, error)

func (*Client) Rebase added in v0.6.0

func (c *Client) Rebase(ctx context.Context, opts RebaseOptions) error

type ClientOption added in v0.6.0

type ClientOption func(c *Client)

func WithCacheDir deprecated added in v0.6.0

func WithCacheDir(path string) ClientOption

WithCacheDir supply your own cache directory.

Deprecated: use WithDownloader instead.

func WithDockerClient added in v0.6.0

func WithDockerClient(docker *dockerClient.Client) ClientOption

WithDockerClient supply your own docker client.

func WithDownloader added in v0.6.0

func WithDownloader(d Downloader) ClientOption

WithDownloader supply your own downloader.

func WithFetcher added in v0.6.0

func WithFetcher(f ImageFetcher) ClientOption

WithFetcher supply your own fetcher.

func WithImageFactory added in v0.6.0

func WithImageFactory(f ImageFactory) ClientOption

WithImageFactory supply your own image factory.

func WithLogger added in v0.6.0

func WithLogger(l logging.Logger) ClientOption

WithLogger supply your own logger.

type ContainerConfig added in v0.6.0

type ContainerConfig struct {
	Network string
}

type CreateBuilderOptions added in v0.6.0

type CreateBuilderOptions struct {
	BuilderName string
	Config      pubbldr.Config
	Publish     bool
	NoPull      bool
}

type CreatePackageOptions added in v0.6.0

type CreatePackageOptions struct {
	Name    string
	Config  buildpackage.Config
	Publish bool
	NoPull  bool
}

type Downloader added in v0.6.0

type Downloader interface {
	Download(ctx context.Context, pathOrURI string) (blob.Blob, error)
}

type ImageFactory added in v0.6.0

type ImageFactory interface {
	NewImage(repoName string, local bool) (imgutil.Image, error)
}

type ImageFetcher added in v0.6.0

type ImageFetcher interface {
	// Fetch fetches an image by resolving it both remotely and locally depending on provided parameters.
	// If daemon is true, it will look return a `local.Image`. Pull, applicable only when daemon is true, will
	// attempt to pull a remote image first.
	Fetch(ctx context.Context, name string, daemon, pull bool) (imgutil.Image, error)
}

type ImageInfo added in v0.6.0

type ImageInfo struct {
	StackID    string
	Buildpacks []lifecycle.Buildpack
	Base       lifecycle.RunImageMetadata
	BOM        []lifecycle.BOMEntry
	Stack      lifecycle.StackMetadata
	Processes  ProcessDetails
}

type Lifecycle added in v0.6.0

type Lifecycle interface {
	Execute(ctx context.Context, opts build.LifecycleOptions) error
}

type ProcessDetails added in v0.6.0

type ProcessDetails struct {
	DefaultProcess *lifecycle.Process
	OtherProcesses []lifecycle.Process
}

type ProxyConfig added in v0.6.0

type ProxyConfig struct {
	HTTPProxy  string
	HTTPSProxy string
	NoProxy    string
}

type RebaseOptions added in v0.6.0

type RebaseOptions struct {
	RepoName          string
	Publish           bool
	SkipPull          bool
	RunImage          string
	AdditionalMirrors map[string][]string
}

Directories

Path Synopsis
cmd
internal
api
builder/testmocks
Package testmocks is a generated GoMock package.
Package testmocks is a generated GoMock package.
commands/testmocks
Package testmocks is a generated GoMock package.
Package testmocks is a generated GoMock package.
dist/testmocks
Package testmocks is a generated GoMock package.
Package testmocks is a generated GoMock package.
logging
Package logging implements the logger for the pack CLI.
Package logging implements the logger for the pack CLI.
Package logging defines the minimal interface that loggers must support to be used by pack.
Package logging defines the minimal interface that loggers must support to be used by pack.
Package testmocks is a generated GoMock package.
Package testmocks is a generated GoMock package.
tools module

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳