Documentation
¶
Overview ¶
Package build turns a source tree without a compose file into a container image. Each way of building is a Builder; a Registry tries them in order and the first that recognizes the tree builds it. Adding or replacing a builder is a registration, not a change to the deploy flow.
Index ¶
Constants ¶
const RailpackFrontend = "ghcr.io/railwayapp/railpack-frontend"
RailpackFrontend is the BuildKit frontend image that executes a Railpack plan.
Variables ¶
var ErrRailpackMissing = errors.New("railpack is not installed on this server; install it with the FlatRun installer or from https://railpack.com to build repositories without a Dockerfile")
Functions ¶
Types ¶
type Dockerfile ¶
type Dockerfile struct {
Run Runner
}
Dockerfile builds a tree with the Dockerfile at its root.
func (Dockerfile) Detect ¶
func (Dockerfile) Detect(dir string) bool
func (Dockerfile) Name ¶
func (Dockerfile) Name() Kind
type Kind ¶
type Kind string
Kind names how a source runs: KindCompose for a tree that brings its own compose file, otherwise the Name of the builder that builds it.
const KindCompose Kind = "compose"
const KindDockerfile Kind = "dockerfile"
const KindRailpack Kind = "railpack"
type Railpack ¶
Railpack builds any tree by detecting its language and framework, so it accepts every directory and belongs last in a registry.
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry holds builders in priority order.
func DefaultRegistry ¶
func DefaultRegistry() *Registry
DefaultRegistry builds with the repository's own Dockerfile when it has one and falls back to Railpack's zero-config detection.