build

package
v1.0.0-alpha.9 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2022 License: Apache-2.0 Imports: 13 Imported by: 2

Documentation

Index

Constants

View Source
const ErrorMessage = `` /* 135-byte string literal not displayed */

ErrorMessage to be displayed when no ARG BUNDLE_DIR is in Dockerfile

Variables

View Source
var (
	// DOCKER_FILE is the file generated before running a docker build.
	DOCKER_FILE = filepath.Join(LOCAL_CNAB, "Dockerfile")

	// LOCAL_CNAB is the generated directory where porter stages the /cnab directory.
	LOCAL_CNAB = ".cnab"

	// LOCAL_APP is the generated directory where porter stages the /cnab/app directory.
	LOCAL_APP = filepath.Join(LOCAL_CNAB, "app")

	// LOCAL_BUNDLE is the generated bundle.json file.
	LOCAL_BUNDLE = filepath.Join(LOCAL_CNAB, "bundle.json")

	// LOCAL_RUN is the path to the generated CNAB entrypoint script, located at /cnab/app/run.
	LOCAL_RUN = filepath.Join(LOCAL_APP, "run")

	// LOCAL_MANIFEST is the canonical Porter manifest generated from the
	// user-provided manifest and any dynamic overrides
	LOCAL_MANIFEST = filepath.Join(LOCAL_APP, "porter.yaml")

	// LOCAL_MIXINS is the path where Porter stages the /cnab/app/mixins directory.
	LOCAL_MIXINS = filepath.Join(LOCAL_APP, "mixins")

	// BUNDLE_DIR is the directory where the bundle is located in the CNAB execution environment.
	BUNDLE_DIR = "/cnab/app"

	// INJECT_PORTER_MIXINS_TOKEN can control where mixin instructions will be placed in Dockerfile.
	INJECT_PORTER_MIXINS_TOKEN = "# PORTER_MIXINS"
)

Functions

This section is empty.

Types

type Builder added in v1.0.1

type Builder interface {
	// BuildInvocationImage using the bundle in the build context directory
	BuildInvocationImage(ctx context.Context, manifest *manifest.Manifest) error

	// TagInvocationImage using the origTag and newTag values supplied
	TagInvocationImage(ctx context.Context, origTag, newTag string) error
}

type DockerfileGenerator

type DockerfileGenerator struct {
	*config.Config
	*manifest.Manifest
	*templates.Templates
	Mixins pkgmgmt.PackageManager
}

func (*DockerfileGenerator) GenerateDockerFile

func (g *DockerfileGenerator) GenerateDockerFile() error

func (*DockerfileGenerator) PrepareFilesystem

func (g *DockerfileGenerator) PrepareFilesystem() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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