Documentation
¶
Index ¶
- type BuildOptions
- type BunStack
- type DetectionEvent
- type GoStack
- type MetaStack
- func (s *MetaStack) AddEnv(key, value string)
- func (s *MetaStack) Entrypoint() string
- func (s *MetaStack) Event(kind, name, message string)
- func (s *MetaStack) Events() []DetectionEvent
- func (s *MetaStack) Image() ocispecs.Image
- func (s *MetaStack) Init(opts BuildOptions)
- func (s *MetaStack) SetCmd(cmd []string)
- func (s *MetaStack) SetCwd(cwd string)
- func (s *MetaStack) SetEntrypoint(ep []string)
- type NodeStack
- type PythonStack
- type RubyStack
- func (s *RubyStack) Detect() bool
- func (s *RubyStack) Entrypoint() string
- func (s *RubyStack) Gemfile() ([]byte, []byte, error)
- func (s *RubyStack) GenerateLLB(dir string, opts BuildOptions) (*llb.State, error)
- func (s *RubyStack) Init(opts BuildOptions)
- func (s *RubyStack) Name() string
- func (s *RubyStack) WebCommand() string
- type RustStack
- type Stack
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BuildOptions ¶
type BuildOptions struct {
Log interface{ Info(string, ...any) }
// Name is the name of the application being built
Name string
// Version specifies the language/runtime version to use
// If empty, defaults to latest stable version
Version string
// CacheNS specifies the namespace for persistent cache mounts
CacheNS string
// The alpine image to use for the base image.
AlpineImage string
OnBuild []string
// EnvVars are user-configured environment variables to inject into build steps
// (onBuild commands, asset precompilation). These are set on intermediate LLB
// states only and do not persist to the final image config.
EnvVars map[string]string
}
BuildOptions contains configuration for stack builds
type BunStack ¶
type BunStack struct {
MetaStack
// contains filtered or unexported fields
}
BunStack implements Stack for Bun
func (*BunStack) GenerateLLB ¶
func (*BunStack) Init ¶ added in v0.2.0
func (s *BunStack) Init(opts BuildOptions)
func (*BunStack) WebCommand ¶ added in v0.2.0
type DetectionEvent ¶ added in v0.2.0
type DetectionEvent struct {
Kind string // e.g., "file", "package", "framework", "config"
Name string // e.g., "Gemfile", "rails", "puma"
Message string // Human-readable description
}
DetectionEvent represents something detected during stack analysis
type GoStack ¶
type GoStack struct {
MetaStack
// contains filtered or unexported fields
}
GoStack implements Stack for Go
func (*GoStack) GenerateLLB ¶
func (*GoStack) Init ¶ added in v0.2.0
func (s *GoStack) Init(opts BuildOptions)
func (*GoStack) WebCommand ¶ added in v0.2.0
type MetaStack ¶
type MetaStack struct {
// contains filtered or unexported fields
}
MetaStack provides shared functionality for all stack implementations
func (*MetaStack) Entrypoint ¶
func (*MetaStack) Events ¶ added in v0.2.0
func (s *MetaStack) Events() []DetectionEvent
Events returns all detection events
func (*MetaStack) Init ¶ added in v0.2.0
func (s *MetaStack) Init(opts BuildOptions)
func (*MetaStack) SetEntrypoint ¶
type NodeStack ¶
type NodeStack struct {
MetaStack
// contains filtered or unexported fields
}
NodeStack implements Stack for Node.js
func (*NodeStack) GenerateLLB ¶
func (*NodeStack) Init ¶ added in v0.2.0
func (s *NodeStack) Init(opts BuildOptions)
func (*NodeStack) WebCommand ¶ added in v0.2.0
type PythonStack ¶
type PythonStack struct {
MetaStack
// contains filtered or unexported fields
}
PythonStack implements Stack for Python
func (*PythonStack) Detect ¶
func (s *PythonStack) Detect() bool
func (*PythonStack) Entrypoint ¶
func (s *PythonStack) Entrypoint() string
func (*PythonStack) GenerateLLB ¶
func (s *PythonStack) GenerateLLB(dir string, opts BuildOptions) (*llb.State, error)
func (*PythonStack) Init ¶ added in v0.2.0
func (s *PythonStack) Init(opts BuildOptions)
func (*PythonStack) Name ¶
func (s *PythonStack) Name() string
func (*PythonStack) WebCommand ¶ added in v0.2.0
func (s *PythonStack) WebCommand() string
type RubyStack ¶
type RubyStack struct {
MetaStack
// contains filtered or unexported fields
}
RubyStack implements Stack for Ruby on Rails
func (*RubyStack) Entrypoint ¶
func (*RubyStack) GenerateLLB ¶
func (*RubyStack) Init ¶ added in v0.2.0
func (s *RubyStack) Init(opts BuildOptions)
func (*RubyStack) WebCommand ¶ added in v0.2.0
type RustStack ¶ added in v0.2.0
type RustStack struct {
MetaStack
// contains filtered or unexported fields
}
RustStack implements Stack for Rust
func (*RustStack) GenerateLLB ¶ added in v0.2.0
func (*RustStack) Init ¶ added in v0.2.0
func (s *RustStack) Init(opts BuildOptions)
func (*RustStack) WebCommand ¶ added in v0.2.0
type Stack ¶
type Stack interface {
Name() string
// Detect returns true if the given directory contains code for this stack
Detect() bool
// Init is called after detection to perform common initialization
Init(opts BuildOptions)
// GenerateLLB creates the BuildKit LLB for building this stack
GenerateLLB(dir string, opts BuildOptions) (*llb.State, error)
Image() ocispecs.Image
Entrypoint() string
// WebCommand returns the default command for the web service in a Procfile
WebCommand() string
// Events returns detection events collected during Detect() and Init()
Events() []DetectionEvent
}
Stack represents a programming language/framework stack
func DetectStack ¶
func DetectStack(dir string, opts BuildOptions) (Stack, error)
DetectStack identifies the programming stack in the given directory
Click to show internal directories.
Click to hide internal directories.