tini

package module
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

README

Tini Cloud Native Buildpack

The Tini CNB provides the Tini executable. The buildpack installs tini onto the $PATH which makes it available for subsequent buildpacks and/or the final container image.

Integration

The Tini CNB provides tini as a dependency. Downstream buildpacks can require the tini dependency by generating a Build Plan TOML file that looks like the following:

[[requires]]

  # The name of the Tini dependency is "tini". This value is
  # considered part of the public API for the buildpack and will not change
  # without a plan for deprecation.
  name = "tini"

  # Note: The version field is unsupported at this time

  # The Tini buildpack supports some non-required metadata options.
  [requires.metadata]

    # Setting the build flag to true will ensure that the Tini
    # dependency is available on the $PATH for subsequent buildpacks during
    # their build phase. If you are writing a buildpack that needs to run Tini
    # during its build process, this flag should be set to true.
    build = true

    # Setting the launch flag to true will ensure that the Tini
    # dependency is available on the $PATH for the running application. If you are
    # writing an application that needs to run Tini at runtime, this flag should
    # be set to true.
    launch = true

Usage

To package this buildpack for consumption:

$ ./scripts/package.sh

buildpack.yml Configuration

The tini buildpack does not support configurations via buildpack.yml.

Documentation

Index

Constants

View Source
const (
	Tini               = "tini"
	DependencyCacheKey = "dependency-sha"
)

Variables

This section is empty.

Functions

func Build

func Build(
	entries EntryResolver,
	dependencies DependencyManager,
	planRefinery BuildPlanRefinery,
	clock chronos.Clock,
	logger LogEmitter,
) packit.BuildFunc

func Detect

func Detect() packit.DetectFunc

Types

type BuildPlanRefinery

type BuildPlanRefinery interface {
	BillOfMaterials(postal.Dependency) packit.BuildpackPlanEntry
}

type DependencyManager

type DependencyManager interface {
	Resolve(path, id, version, stack string) (postal.Dependency, error)
	Install(dependency postal.Dependency, cnbPath, layerPath string) error
}

type EntryResolver

type EntryResolver interface {
	Resolve([]packit.BuildpackPlanEntry) packit.BuildpackPlanEntry
}

type LogEmitter

type LogEmitter struct {
	// Logger is embedded and therefore delegates all of its functions to the
	// LogEmitter.
	scribe.Logger
}

func NewLogEmitter

func NewLogEmitter(output io.Writer) LogEmitter

type PlanEntryResolver

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

func NewPlanEntryResolver

func NewPlanEntryResolver(logger LogEmitter) PlanEntryResolver

func (PlanEntryResolver) Resolve

type PlanRefinery

type PlanRefinery struct{}

func NewPlanRefinery

func NewPlanRefinery() PlanRefinery

func (PlanRefinery) BillOfMaterials

func (r PlanRefinery) BillOfMaterials(dependency postal.Dependency) packit.BuildpackPlanEntry

Directories

Path Synopsis
dependency
retrieval module

Jump to

Keyboard shortcuts

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