Versions in this module Expand all Collapse all v0 v0.20.3 Feb 3, 2026 v0.20.2 Jan 31, 2026 v0.20.1 Jan 16, 2026 v0.20.0 Jan 7, 2026 Changes in this version + func GetJSONSchema() []byte type GeneratorGomod + Edits *GomodEdits + func (g *GeneratorGomod) GetReplace() []GomodReplace + type GomodEdits struct + Replace []GomodReplace + type GomodReplace struct + Original string + Update string + func (r *GomodReplace) MarshalJSON() ([]byte, error) + func (r *GomodReplace) MarshalYAML() ([]byte, error) + func (r *GomodReplace) UnmarshalJSON(b []byte) error + func (r *GomodReplace) UnmarshalYAML(ctx context.Context, node ast.Node) error + func (r GomodReplace) String() string type Source + LLB *SourceLLB + type SourceLLB struct + func (s *SourceLLB) IsDir() bool + func (s *SourceLLB) UnmarshalYAML(ctx context.Context, node ast.Node) error type Spec + func (s *Spec) Preprocess(client gwclient.Client, sOpt SourceOpts, worker llb.State, ...) error v0.19.1 Dec 8, 2025 v0.19.0 Dec 5, 2025 Changes in this version + const CheckFileLinkTargetPathKind + func CapabilitiesString(caps []ArtifactCapability) string + type ArtifactCapability struct + Effective bool + Inheritable bool + Name string + Permitted bool + func (c ArtifactCapability) String() string type ArtifactConfig + LinuxCapabilities []ArtifactCapability type FileCheckOutput + LinkTarget string + NoFollow bool v0.18.2 Nov 11, 2025 v0.18.1 Oct 28, 2025 Changes in this version + const BazelDefaultSocketID + const CheckFileIsDirKind + const CheckFileNotExistsKind + const CheckFilePermissionsKind + const CheckOutputContainsKind + const CheckOutputEmptyKind + const CheckOutputEndsWithKind + const CheckOutputEqualsKind + const CheckOutputMatchesKind + const CheckOutputStartsWithKind + const DefaultPatchStrip + const GenericPkg + const GomodCacheKey + const KeyDalecTarget + const PreBuiltPkgSuffix + var ErrInvalidExtKey = errors.New("extension keys must start with \"x-\"") + var ErrNodeNotFound = errors.New("node not found") + func AllowAnyArg(s string) bool + func AsTar(worker llb.State, dest string, opts ...llb.ConstraintsOpt) llb.StateOption + func BuildImageConfig(spec *Spec, targetKey string, img *DockerImageSpec) error + func DefaultTarWorker(resolver llb.ImageMetaResolver, opts ...llb.ConstraintsOpt) llb.State + func DisableDiffMerge(v bool) + func DisallowAllUndeclared(s string) bool + func DuplicateMap[K comparable, V any](m map[K]V) map[K]V + func ErrorState(in llb.State, err error) llb.State + func ErrorStateOption(err error) llb.StateOption + func GetRepoKeys(configs []PackageRepositoryConfig, cfg *RepoPlatformConfig, sOpt SourceOpts, ...) (llb.RunOption, []string) + func HasGolang(spec *Spec, targetKey string) bool + func HasNpm(spec *Spec, targetKey string) bool + func InstallPostSymlinks(post *PostInstall, worker llb.State, opts ...llb.ConstraintsOpt) llb.StateOption + func MergeAtPath(input llb.State, states []llb.State, dest string, opts ...llb.ConstraintsOpt) llb.State + func MergeImageConfig(dst *DockerImageConfig, src *ImageConfig) error + func MergeSourceLocations(opts ...llb.ConstraintsOpt) llb.ConstraintsOpt + func NoopStateOption(in llb.State) llb.State + func PatchSources(worker llb.State, spec *Spec, sourceToState map[string]llb.State, ...) map[string]llb.State + func Platform(platform *ocispecs.Platform) llb.ConstraintsOpt + func ProgressGroup(name string) llb.ConstraintsOpt + func SetBuildNetworkMode(spec *Spec) llb.StateOption + func ShArgs(args string) llb.RunOption + func ShArgsf(format string, args ...interface{}) llb.RunOption + func SortMapKeys[K cmp.Ordered, V any](m map[K]V) []K + func SortedMapIter[K cmp.Ordered, V any](m map[K]V) iter.Seq2[K, V] + func SortedMapValues[T any](m map[string]T) []T + func SourceIsDir(src Source) bool + func Sources(spec *Spec, sOpt SourceOpts, opts ...llb.ConstraintsOpt) (map[string]llb.State, error) + func Tar(work llb.State, st llb.State, dest string, opts ...llb.ConstraintsOpt) llb.State + func WithAllowAnyArg(cfg *SubstituteConfig) + func WithConstraint(in *llb.Constraints) llb.ConstraintsOpt + func WithConstraints(ls ...llb.ConstraintsOpt) llb.ConstraintsOpt + func WithCreateDestPath() llb.CopyOption + func WithDirContentsOnly() llb.CopyOption + func WithExcludes(patterns []string) llb.CopyOption + func WithIncludes(patterns []string) llb.CopyOption + func WithMountedAptCache(namePrefix string) llb.RunOption + func WithRepoConfigs(repos []PackageRepositoryConfig, cfg *RepoPlatformConfig, sOpt SourceOpts, ...) llb.RunOption + func WithRepoData(repos []PackageRepositoryConfig, sOpts SourceOpts, opts ...llb.ConstraintsOpt) llb.RunOption + func WithRunOptions(opts ...llb.RunOption) llb.RunOption + type AddGroupConfig struct + Name string + type AddUserConfig struct + Name string + type ArtifactBuild struct + Caches []CacheConfig + Env map[string]string + NetworkMode string + Steps BuildStepList + type ArtifactConfig struct + Group string + Name string + Permissions fs.FileMode + SubPath string + User string + func (a *ArtifactConfig) ResolveName(path string) string + type ArtifactDirConfig struct + Group string + Mode fs.FileMode + User string + type ArtifactSymlinkConfig struct + Dest string + Group string + Source string + User string + type Artifacts struct + Binaries map[string]ArtifactConfig + ConfigFiles map[string]ArtifactConfig + DataDirs map[string]ArtifactConfig + Directories *CreateArtifactDirectories + DisableAutoRequires bool + DisableStrip bool + Docs map[string]ArtifactConfig + Groups []AddGroupConfig + Headers map[string]ArtifactConfig + Libexec map[string]ArtifactConfig + Libs map[string]ArtifactConfig + Licenses map[string]ArtifactConfig + Links []ArtifactSymlinkConfig + Manpages map[string]ArtifactConfig + Systemd *SystemdConfiguration + Users []AddUserConfig + func (a *Artifacts) IsEmpty() bool + func (a Artifacts) HasDocs() bool + type BaseImage struct + Rootfs Source + func (bi *BaseImage) ResolveImageConfig(ctx context.Context, sOpt SourceOpts, opt sourceresolver.Opt) ([]byte, error) + func (bi *BaseImage) ToState(sOpt SourceOpts, opts ...llb.ConstraintsOpt) llb.State + type BazelCache struct + Scope string + func (c *BazelCache) ToRunOption(worker llb.State, distroKey string, opts ...BazelCacheOption) llb.RunOption + type BazelCacheInfo struct + Platform *ocispecs.Platform + type BazelCacheOption interface + SetBazelCacheOption func(*BazelCacheInfo) + type BazelCacheOptionFunc func(*BazelCacheInfo) + func (f BazelCacheOptionFunc) SetBazelCacheOption(info *BazelCacheInfo) + type BuildStep struct + Command string + Env map[string]string + Mounts []SourceMount + func (step *BuildStep) GetSourceLocation(state llb.State) (ret llb.ConstraintsOpt) + func (step *BuildStep) UnmarshalYAML(ctx context.Context, node ast.Node) error + type BuildStepList []BuildStep + func (ls *BuildStepList) UnmarshalYAML(ctx context.Context, node ast.Node) error + func (ls BuildStepList) GetSourceLocation(st llb.State) llb.ConstraintsOpt + type CacheConfig struct + Bazel *BazelCache + Dir *CacheDir + GoBuild *GoBuildCache + RustSCCache *SCCache + func (c *CacheConfig) ToRunOption(worker llb.State, distroKey string, opts ...CacheConfigOption) llb.RunOption + type CacheConfigOption interface + SetCacheConfigOption func(*CacheInfo) + func WithBazelCacheConstraints(opts ...llb.ConstraintsOpt) CacheConfigOption + func WithCacheDirConstraints(opts ...llb.ConstraintsOpt) CacheConfigOption + func WithGoCacheConstraints(opts ...llb.ConstraintsOpt) CacheConfigOption + type CacheConfigOptionFunc func(*CacheInfo) + func (f CacheConfigOptionFunc) SetCacheConfigOption(info *CacheInfo) + type CacheDir struct + Dest string + Key string + NoAutoNamespace bool + Sharing string + func (c *CacheDir) ToRunOption(distroKey string, opts ...CacheDirOption) llb.RunOption + type CacheDirInfo struct + Platform *ocispecs.Platform + type CacheDirOption interface + SetCacheDirOption func(*CacheDirInfo) + type CacheDirOptionFunc func(*CacheDirInfo) + func (f CacheDirOptionFunc) SetCacheDirOption(info *CacheDirInfo) + type CacheInfo struct + Bazel BazelCacheInfo + DirInfo CacheDirInfo + GoBuild GoBuildCacheInfo + RustSCCache SCCacheInfo + type ChangelogEntry struct + Author string + Changes []string + Date Date + type CheckOutput struct + Contains []string + Empty bool + EndsWith string + Equals string + Matches []string + StartsWith string + func (c CheckOutput) Check(dt string, p string) (retErr error) + func (c CheckOutput) GetErrSource(err *CheckOutputError) *errdefs.Source + func (c CheckOutput) IsEmpty() bool + func (check *CheckOutput) UnmarshalYAML(ctx context.Context, node ast.Node) error + type CheckOutputError struct + Actual string + Expected string + Kind string + Path string + func (c *CheckOutputError) Error() string + type Command struct + Dir string + Env map[string]string + Mounts []SourceMount + Steps []*BuildStep + type ConstraintsOptFunc func(*llb.Constraints) + func (f ConstraintsOptFunc) SetConstraintsOption(c *llb.Constraints) + func (f ConstraintsOptFunc) SetGitOption(gi *llb.GitInfo) + func (f ConstraintsOptFunc) SetHTTPOption(hi *llb.HTTPInfo) + func (f ConstraintsOptFunc) SetImageOption(ii *llb.ImageInfo) + func (f ConstraintsOptFunc) SetLocalOption(li *llb.LocalInfo) + func (f ConstraintsOptFunc) SetOCILayoutOption(oi *llb.OCILayoutInfo) + func (f ConstraintsOptFunc) SetRunOption(ei *llb.ExecInfo) + type CreateArtifactDirectories struct + Config map[string]ArtifactDirConfig + State map[string]ArtifactDirConfig + func (d *CreateArtifactDirectories) GetConfig() map[string]ArtifactDirConfig + func (d *CreateArtifactDirectories) GetState() map[string]ArtifactDirConfig + type Date struct + func (d *Date) UnmarshalJSON(dt []byte) error + func (d *Date) UnmarshalYAML(dt []byte) error + func (d Date) Compare(other Date) int + func (d Date) MarshalJSON() ([]byte, error) + func (d Date) MarshalYAML() ([]byte, error) + func (d Date) String() string + type DockerImageConfig = dockerspec.DockerOCIImageConfig + type DockerImageSpec = dockerspec.DockerOCIImage + func BaseImageConfig(platform *ocispecs.Platform) *DockerImageSpec + type ExtDecodeConfig struct + AllowUnknownFields bool + type FileCheckOutput struct + IsDir bool + NotExist bool + Permissions fs.FileMode + func (c FileCheckOutput) Check(dt string, mode fs.FileMode, isDir bool, p string) error + func (c FileCheckOutput) GetErrSource(err *CheckOutputError) *errdefs.Source + func (check *FileCheckOutput) UnmarshalYAML(ctx context.Context, node ast.Node) error + type FilterFunc = func(string, []string, []string, ...llb.ConstraintsOpt) llb.StateOption + type ForwarderFunc func(llb.State, *SourceBuild, ...llb.ConstraintsOpt) (llb.State, error) + type Frontend struct + CmdLine string + Image string + type GeneratorCargohome struct + Paths []string + func (gen *GeneratorCargohome) UnmarshalYAML(ctx context.Context, node ast.Node) error + type GeneratorGomod struct + Auth map[string]GomodGitAuth + Paths []string + func (gen *GeneratorGomod) UnmarshalYAML(ctx context.Context, node ast.Node) error + type GeneratorNodeMod struct + Paths []string + func (gen *GeneratorNodeMod) UnmarshalYAML(ctx context.Context, node ast.Node) error + type GeneratorPip struct + ExtraIndexUrls []string + IndexUrl string + Paths []string + RequirementsFile string + func (gen *GeneratorPip) UnmarshalYAML(ctx context.Context, node ast.Node) error + type GitAuth struct + Header string + SSH string + Token string + func (a *GitAuth) SetGitOption(gi *llb.GitInfo) + type GoBuildCache struct + Disabled bool + Scope string + func (c *GoBuildCache) ToRunOption(distroKey string, opts ...GoBuildCacheOption) llb.RunOption + type GoBuildCacheInfo struct + Platform *ocispecs.Platform + type GoBuildCacheOption interface + SetGoBuildCacheOption func(*GoBuildCacheInfo) + type GoBuildCacheOptionFunc func(*GoBuildCacheInfo) + func (f GoBuildCacheOptionFunc) SetGoBuildCacheOption(info *GoBuildCacheInfo) + type GomodGitAuth struct + Header string + SSH *GomodGitAuthSSH + Token string + type GomodGitAuthSSH struct + ID string + Username string + type ImageConfig struct + Base string + Bases []BaseImage + Cmd string + Entrypoint string + Env []string + Labels map[string]string + Post *PostInstall + StopSignal string + User string + Volumes map[string]struct{} + WorkingDir string + func MergeSpecImage(spec *Spec, targetKey string) *ImageConfig + type InvalidPatchError struct + Err error + PatchSpec *PatchSpec + Source string + func (s *InvalidPatchError) Error() string + func (s *InvalidPatchError) Unwrap() error + type InvalidSourceError struct + Err error + Name string + func (s *InvalidSourceError) Error() string + func (s *InvalidSourceError) Unwrap() error + type LLBGetter func(sOpts SourceOpts, opts ...llb.ConstraintsOpt) (llb.State, error) + type PackageConfig struct + Signer *PackageSigner + type PackageConstraints struct + Arch []string + Version []string + func (pc *PackageConstraints) GetSourceLocation(state llb.State) llb.ConstraintsOpt + func (pc *PackageConstraints) UnmarshalYAML(ctx context.Context, node ast.Node) error + type PackageDependencies struct + Build PackageDependencyList + ExtraRepos []PackageRepositoryConfig + Recommends PackageDependencyList + Runtime PackageDependencyList + Sysext PackageDependencyList + Test PackageDependencyList + func MergeDependencies(base, target *PackageDependencies) *PackageDependencies + func (p *PackageDependencies) GetBuild() PackageDependencyList + func (p *PackageDependencies) GetExtraRepos(env string) []PackageRepositoryConfig + func (p *PackageDependencies) GetRecommends() PackageDependencyList + func (p *PackageDependencies) GetRuntime() PackageDependencyList + func (p *PackageDependencies) GetSysext() PackageDependencyList + func (p *PackageDependencies) GetTest() PackageDependencyList + type PackageDependencyList map[string]PackageConstraints + func (l *PackageDependencyList) UnmarshalYAML(ctx context.Context, node ast.Node) error + func (l PackageDependencyList) GetSourceLocation(state llb.State) llb.ConstraintsOpt + type PackageRepositoryConfig struct + Config map[string]Source + Data []SourceMount + Envs []string + Keys map[string]Source + func GetExtraRepos(repos []PackageRepositoryConfig, env string) []PackageRepositoryConfig + type PackageSigner struct + Args map[string]string + type PatchSpec struct + Path string + Source string + Strip *int + func (p *PatchSpec) UnmarshalYAML(ctx context.Context, node ast.Node) error + type PostInstall struct + Symlinks map[string]SymlinkTarget + type RepoPlatformConfig struct + ConfigExt string + ConfigRoot string + GPGKeyRoot string + type RunOptFunc func(*llb.ExecInfo) + func (f RunOptFunc) SetRunOption(ei *llb.ExecInfo) + type SCCache struct + Scope string + func (c *SCCache) ToRunOption(distroKey string, opts ...SCCacheOption) llb.RunOption + type SCCacheInfo struct + Platform *ocispecs.Platform + type SCCacheOption interface + SetSCCacheOption func(*SCCacheInfo) + type SCCacheOptionFunc func(*SCCacheInfo) + func (f SCCacheOptionFunc) SetSCCacheOption(info *SCCacheInfo) + type Source struct + Build *SourceBuild + Context *SourceContext + DockerImage *SourceDockerImage + Excludes []string + Generate []*SourceGenerator + Git *SourceGit + HTTP *SourceHTTP + Includes []string + Inline *SourceInline + Path string + func (s *Source) IsDir() bool + func (s *Source) ToMount(sOpt SourceOpts, constraints ...llb.ConstraintsOpt) (llb.State, []llb.MountOption) + func (s *Source) ToState(name string, sOpt SourceOpts, opts ...llb.ConstraintsOpt) llb.State + func (s *Source) UnmarshalYAML(ctx context.Context, node ast.Node) error + func (s Source) Doc(name string) io.Reader + type SourceBuild struct + Args map[string]string + DockerfilePath string + Source Source + Target string + func (s *SourceBuild) UnmarshalYAML(ctx context.Context, node ast.Node) error + func (src *SourceBuild) IsDir() bool + type SourceContext struct + Name string + func (s *SourceContext) UnmarshalYAML(ctx context.Context, node ast.Node) error + func (src *SourceContext) IsDir() bool + type SourceDockerImage struct + Cmd *Command + Ref string + func (s *SourceDockerImage) UnmarshalYAML(ctx context.Context, node ast.Node) error + func (src *SourceDockerImage) IsDir() bool + type SourceGenerator struct + Cargohome *GeneratorCargohome + Gomod *GeneratorGomod + NodeMod *GeneratorNodeMod + Pip *GeneratorPip + Subpath string + func (g *SourceGenerator) Validate() error + type SourceGit struct + Auth GitAuth + Commit string + KeepGitDir bool + URL string + func (s *SourceGit) UnmarshalYAML(ctx context.Context, node ast.Node) error + func (src *SourceGit) IsDir() bool + type SourceHTTP struct + Digest digest.Digest + Permissions fs.FileMode + URL string + func (s *SourceHTTP) UnmarshalYAML(ctx context.Context, node ast.Node) error + func (src *SourceHTTP) IsDir() bool + type SourceInline struct + Dir *SourceInlineDir + File *SourceInlineFile + func (s *SourceInline) Doc(w io.Writer, name string) + func (s *SourceInline) UnmarshalYAML(ctx context.Context, node ast.Node) error + func (src *SourceInline) IsDir() bool + type SourceInlineDir struct + Files map[string]*SourceInlineFile + GID int + Permissions fs.FileMode + UID int + func (s *SourceInlineDir) Doc(w io.Writer, name string) + func (s *SourceInlineDir) UnmarshalYAML(ctx context.Context, node ast.Node) error + type SourceInlineFile struct + Contents string + GID int + Permissions fs.FileMode + UID int + func (s *SourceInlineFile) Doc(w io.Writer, name string) + func (s *SourceInlineFile) UnmarshalYAML(ctx context.Context, node ast.Node) error + type SourceMount struct + Dest string + Spec Source + func (s SourceMount) ToRunOption(sOpt SourceOpts, c llb.ConstraintsOpt) llb.RunOption + type SourceOpts struct + Forward ForwarderFunc + GetContext func(string, ...llb.LocalOption) (*llb.State, error) + GitCredHelperOpt func() (llb.RunOption, error) + Resolver llb.ImageMetaResolver + TargetPlatform *ocispecs.Platform + type Spec struct + Args map[string]string + Artifacts Artifacts + Build ArtifactBuild + Changelog []ChangelogEntry + Conflicts PackageDependencyList + Dependencies *PackageDependencies + Description string + Image *ImageConfig + License string + Name string + NoArch bool + PackageConfig *PackageConfig + Packager string + Patches map[string][]PatchSpec + Provides PackageDependencyList + Replaces PackageDependencyList + Revision string + Sources map[string]Source + Targets map[string]Target + Tests []*TestSpec + Vendor string + Version string + Website string + func LoadSpec(dt []byte) (*Spec, error) + func LoadSpecWithSourceMap(filename string, dt []byte) (*Spec, error) + func (s *Spec) CargohomeDeps(sOpt SourceOpts, worker llb.State, opts ...llb.ConstraintsOpt) (*llb.State, error) + func (s *Spec) Ext(key string, target interface{}, opts ...func(*ExtDecodeConfig)) error + func (s *Spec) FillDefaults() + func (s *Spec) GetArtifacts(targetKey string) Artifacts + func (s *Spec) GetBuildRepos(targetKey string) []PackageRepositoryConfig + func (s *Spec) GetConflicts(targetKey string) PackageDependencyList + func (s *Spec) GetImageBases(targetKey string) []BaseImage + func (s *Spec) GetImagePost(target string) *PostInstall + func (s *Spec) GetInstallRepos(targetKey string) []PackageRepositoryConfig + func (s *Spec) GetPackageDeps(target string) *PackageDependencies + func (s *Spec) GetProvides(targetKey string) PackageDependencyList + func (s *Spec) GetReplaces(targetKey string) PackageDependencyList + func (s *Spec) GetSigner(targetKey string) (*PackageSigner, bool) + func (s *Spec) GetSingleBase(targetKey string) (*BaseImage, error) + func (s *Spec) GetTestRepos(targetKey string) []PackageRepositoryConfig + func (s *Spec) GomodDeps(sOpt SourceOpts, worker llb.State, opts ...llb.ConstraintsOpt) (*llb.State, error) + func (s *Spec) HasCargohomes() bool + func (s *Spec) HasGomods() bool + func (s *Spec) HasNodeMods() bool + func (s *Spec) HasPips() bool + func (s *Spec) NodeModDeps(sOpt SourceOpts, worker llb.State, opts ...llb.ConstraintsOpt) (map[string]llb.State, error) + func (s *Spec) PipDeps(sOpt SourceOpts, worker llb.State, opts ...llb.ConstraintsOpt) (*llb.State, error) + func (s *Spec) SubstituteArgs(env map[string]string, opts ...SubstituteOpt) error + func (s *Spec) UnmarshalYAML(ctx context.Context, node ast.Node) error + func (s *Spec) WithExtension(key string, value interface{}) error + func (s Spec) MarshalYAML() ([]byte, error) + func (s Spec) Validate() error + type SubstituteConfig struct + AllowArg func(string) bool + type SubstituteOpt func(*SubstituteConfig) + type SymlinkTarget struct + Group string + Path string + Paths []string + User string + type SystemdConfiguration struct + Dropins map[string]SystemdDropinConfig + Units map[string]SystemdUnitConfig + func (s *SystemdConfiguration) EnabledUnits() map[string]SystemdUnitConfig + func (s *SystemdConfiguration) GetDropins() map[string]SystemdDropinConfig + func (s *SystemdConfiguration) GetUnits() map[string]SystemdUnitConfig + func (s *SystemdConfiguration) IsEmpty() bool + type SystemdDropinConfig struct + Name string + Unit string + func (s SystemdDropinConfig) Artifact() *ArtifactConfig + type SystemdUnitConfig struct + Enable bool + Name string + Start bool + func (s SystemdUnitConfig) Artifact() *ArtifactConfig + func (s SystemdUnitConfig) ResolveName(name string) string + func (s SystemdUnitConfig) SplitName(name string) (string, string) + type Target struct + Artifacts *Artifacts + Conflicts PackageDependencyList + Dependencies *PackageDependencies + Frontend *Frontend + Image *ImageConfig + PackageConfig *PackageConfig + Provides PackageDependencyList + Replaces PackageDependencyList + Tests []*TestSpec + type TestSpec struct + Dir string + Env map[string]string + Files map[string]FileCheckOutput + Mounts []SourceMount + Name string + Steps []TestStep + func (t *TestSpec) GetSourceLocation(state llb.State) llb.ConstraintsOpt + type TestStep struct + Command string + Env map[string]string + Stderr CheckOutput + Stdin string + Stdout CheckOutput + func (step *TestStep) UnmarshalYAML(ctx context.Context, node ast.Node) error + func (ts *TestStep) GetSourceLocation(state llb.State) llb.ConstraintsOpt