Documentation
¶
Overview ¶
Package builder turns app source into a Dockerfile by detecting the stack.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Artifact ¶
type Artifact struct{ From, To string }
Artifact is a file copied from the build stage into the runtime image.
type Builder ¶
type Builder interface {
Name() string
Dockerfile(port int, env map[string]string) (string, error)
}
type Plan ¶
type Plan struct {
Base string // build/runtime base image
CacheFiles []string // manifest files to copy before Install (layer caching)
Install []string // install commands
Build []string // build commands (empty if none)
Env map[string]string // env available at build time (ENV in the build stage)
// Multi-stage server: when RuntimeBase is set, the final image is RuntimeBase
// with artifacts copied from the build stage (e.g. a compiled Go binary).
RuntimeBase string
Copy []Artifact
// Exactly one of these says how to serve:
StaticDir string // serve this directory of static files, or
Start []string // run this command (rendered as an exec-form CMD)
Port int
}
Plan is a runtime-agnostic description of how to build and serve an app. A stack builder produces one; render turns it into a Dockerfile. This is the seam every language and framework flows through.
Click to show internal directories.
Click to hide internal directories.