packs

package module
v0.0.0-...-a978d05 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2018 License: Apache-2.0 Imports: 7 Imported by: 0

README

Packs

Build Status GoDoc

This repo contains Packs: buildpack cloud builders for the Cloud Foundry and Heroku buildpacks.

These cloud builders are available on Docker Hub.

Quick Start: Cloud Foundry Packs

Build:

docker run --rm -v "$(pwd)/app:/workspace" -v "$(pwd)/out:/out" packs/cf:build

Run:

docker run --rm -P \
    -v "$(pwd)/out:/workspace" \
    packs/cf:run -droplet droplet.tgz -metadata result.json

Export to Docker daemon:

docker run --rm \
    -v "$(pwd)/out:/workspace" \
    -v "/var/run/docker.sock:/var/run/docker.sock" \
    packs/cf:export -daemon -droplet droplet.tgz -metadata result.json my-image

Export to Docker registry:

docker run --rm \
    -v "$(pwd)/out:/workspace" \
    -v "$HOME/.docker/config.json:/root/.docker/config.json" \
    packs/cf:export -droplet droplet.tgz -metadata result.json my-image

Documentation

Index

Constants

View Source
const (
	EnvAppDir = "PACK_APP_DIR"
	EnvAppZip = "PACK_APP_ZIP"

	EnvAppName = "PACK_APP_NAME"
	EnvAppURI  = "PACK_APP_URI"

	EnvAppDisk   = "PACK_APP_DISK"
	EnvAppMemory = "PACK_APP_MEM"
	EnvAppFds    = "PACK_APP_FDS"

	EnvDropletPath  = "PACK_DROPLET_PATH"
	EnvSlugPath     = "PACK_SLUG_PATH"
	EnvMetadataPath = "PACK_METADATA_PATH"

	EnvStackName  = "PACK_STACK_NAME"
	EnvUseDaemon  = "PACK_USE_DAEMON"
	EnvUseHelpers = "PACK_USE_HELPERS"
)
View Source
const (
	BuildLabel     = "sh.packs.build"
	BuildpackLabel = "sh.packs.buildpacks"
)
View Source
const (
	CodeFailed      = 1
	CodeInvalidArgs = iota + 2
	CodeInvalidEnv
	CodeNotFound
	CodeFailedDetect
	CodeFailedBuild
	CodeFailedLaunch
	CodeFailedUpdate
)

Variables

This section is empty.

Functions

func Exit

func Exit(err error)

func FailCode

func FailCode(code int, action ...string) error

func FailErr

func FailErr(err error, action ...string) error

func FailErrCode

func FailErrCode(err error, code int, action ...string) error

func InputDropletPath

func InputDropletPath(path *string)

func InputMetadataPath

func InputMetadataPath(path *string)

func InputSlugPath

func InputSlugPath(path *string)

func InputStackName

func InputStackName(image *string)

func InputUseDaemon

func InputUseDaemon(use *bool)

func InputUseHelpers

func InputUseHelpers(use *bool)

func Run

func Run(name string, arg ...string) (string, error)

Types

type AppMetadata

type AppMetadata struct {
	Name string `json:"name"`
	SHA  string `json:"sha"`
}

type BuildMetadata

type BuildMetadata struct {
	App        AppMetadata         `json:"app"`
	Buildpacks []BuildpackMetadata `json:"buildpacks"`
	RunImage   RunImageMetadata    `json:"runimage"`
}

type BuildpackMetadata

type BuildpackMetadata struct {
	Key     string `json:"key"`
	Name    string `json:"name"`
	Version string `json:"version,omitempty"`
}

type ErrorFail

type ErrorFail struct {
	Err    error
	Code   int
	Action []string
}

func (*ErrorFail) Error

func (e *ErrorFail) Error() string

type RunImageMetadata

type RunImageMetadata struct {
	Name string `json:"name"`
	SHA  string `json:"sha"`
}

Directories

Path Synopsis
cf
heroku
app

Jump to

Keyboard shortcuts

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