Documentation
¶
Index ¶
- Constants
- func DisplayProgress(ctx context.Context, eg *errgroup.Group, buildChannel chan *client.SolveStatus, ...)
- func GetDefaultLinuxPlatform() ispec.Platform
- func GetRepoNameWithDigest(patchedImageName, imageDigest string) string
- func ResolvePatchedImageName(imageRef reference.Named, explicitTag, suffix string) (imageName, patchTag string, err error)
- func ResolvePatchedTag(imageRef reference.Named, explicitTag, suffix string) (string, error)
- func SetupBuildkitConfigAndManager(ctx context.Context, c gwclient.Client, image string, platform *ispec.Platform, ...) (*buildkit.Config, pkgmgr.PackageManager, error)
- type OSInfo
Constants ¶
const (
LINUX = "linux"
)
Variables ¶
This section is empty.
Functions ¶
func DisplayProgress ¶
func DisplayProgress(ctx context.Context, eg *errgroup.Group, buildChannel chan *client.SolveStatus, progress progressui.DisplayMode)
DisplayProgress starts a goroutine to display build progress. This encapsulates the common pattern used in both generate and patch commands.
func GetDefaultLinuxPlatform ¶
GetDefaultLinuxPlatform returns a normalized Linux platform, defaulting to Linux if not already Linux.
func GetRepoNameWithDigest ¶ added in v0.12.0
GetRepoNameWithDigest extracts repo name with digest from image name and digest. e.g. "docker.io/library/nginx:1.21.6-patched" -> "nginx@sha256:...".
func ResolvePatchedImageName ¶ added in v0.12.0
func ResolvePatchedImageName(imageRef reference.Named, explicitTag, suffix string) (imageName, patchTag string, err error)
ResolvePatchedImageName merges with suffix rules or uses the explicitTag entirely, returning the final patched image name and tag.
func ResolvePatchedTag ¶
ResolvePatchedTag merges explicit tag & suffix rules, returning the final patched tag.
func SetupBuildkitConfigAndManager ¶
func SetupBuildkitConfigAndManager( ctx context.Context, c gwclient.Client, image string, platform *ispec.Platform, workingFolder string, osInfo *OSInfo, ) (*buildkit.Config, pkgmgr.PackageManager, error)
SetupBuildkitConfigAndManager initializes buildkit config and package manager. This combines the common pattern used in both generate and patch commands.