Documentation
¶
Index ¶
- func AptInstall(packages []string, opts ...llb.ConstraintsOpt) llb.RunOption
- func AptInstallIntoRoot(rootfsPath string, packages []string, targetArch string, ...) llb.RunOption
- func InstallLocalPkg(pkg llb.State, upgrade bool, opts ...llb.ConstraintsOpt) llb.RunOption
- type Config
- func (c *Config) BuildContainer(ctx context.Context, client gwclient.Client, sOpt dalec.SourceOpts, ...) llb.State
- func (cfg *Config) BuildImageConfig(ctx context.Context, sOpt dalec.SourceOpts, spec *dalec.Spec, ...) (*dalec.DockerImageSpec, error)
- func (d *Config) BuildPkg(ctx context.Context, client gwclient.Client, sOpt dalec.SourceOpts, ...) llb.State
- func (d *Config) DownloadDeps(worker llb.State, sOpt dalec.SourceOpts, spec *dalec.Spec, targetKey string, ...) llb.State
- func (c *Config) ExtractPkg(ctx context.Context, client gwclient.Client, sOpt dalec.SourceOpts, ...) llb.State
- func (cfg *Config) HandleSourcePkg(ctx context.Context, client gwclient.Client) (*gwclient.Result, error)
- func (cfg *Config) HandleWorker(ctx context.Context, client gwclient.Client) (*gwclient.Result, error)
- func (d *Config) InstallBuildDeps(ctx context.Context, sOpt dalec.SourceOpts, spec *dalec.Spec, targetKey string, ...) llb.StateOption
- func (d *Config) InstallTestDeps(sOpt dalec.SourceOpts, targetKey string, spec *dalec.Spec, ...) llb.StateOption
- func (cfg *Config) RepoMounts(repos []dalec.PackageRepositoryConfig, sOpt dalec.SourceOpts, ...) llb.RunOption
- func (cfg *Config) Routes(prefix string, spec *dalec.Spec) ([]frontend.Route, error)
- func (cfg *Config) RunTests(ctx context.Context, client gwclient.Client, sOpt dalec.SourceOpts, ...) llb.StateOption
- func (cfg *Config) SysextWorker(sOpts dalec.SourceOpts, opts ...llb.ConstraintsOpt) llb.State
- func (d *Config) Validate(spec *dalec.Spec) error
- func (cfg *Config) Worker(sOpt dalec.SourceOpts, opts ...llb.ConstraintsOpt) llb.State
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AptInstall ¶
func AptInstall(packages []string, opts ...llb.ConstraintsOpt) llb.RunOption
AptInstall returns an llb.RunOption that uses apt to install the provided packages.
This returns an llb.RunOption but it does create some things internally, This is what the constraints opts are used for. The constraints are applied after any constraint set on the llb.ExecInfo
func AptInstallIntoRoot ¶ added in v0.21.0
func AptInstallIntoRoot(rootfsPath string, packages []string, targetArch string, buildPlat ocispecs.Platform) llb.RunOption
AptInstallIntoRoot installs packages into a mounted root filesystem (rootfsPath) while running apt/dpkg from the *current* container environment (i.e. build platform). Notes:
- This relies on the target rootfs containing valid /etc/apt and /var/lib/dpkg state.
- Maintainer scripts execute inside the target rootfs. If they invoke target-arch binaries, they will require emulation (binfmt/qemu) on the build host. This still avoids running the entire apt install pipeline under emulation: dependency resolution/download/unpack are native; only maintainer scripts may be emulated.
func InstallLocalPkg ¶
InstallLocalPkg installs all deb packages found in the root of the provided llb.State
In some cases, with strict version constraints in the package's dependencies, this will use `aptitude` to help resolve those dependencies since apt is currently unable to handle strict constraints.
This returns an llb.RunOption but it does create some things internally, This is what the constraints opts are used for. The constraints are applied after any constraint set on the llb.ExecInfo
Types ¶
type Config ¶
type Config struct {
ImageRef string
ContextRef string
VersionID string
AptCachePrefix string
BuilderPackages []string
BasePackages []string
RepoPlatformConfig *dalec.RepoPlatformConfig
DefaultOutputImage string
// ExtraRepos is used by distributions that want to enable extra repositories
// that are not in the base worker config.
// A prime example of this is adding Debian backports on debian distributions.
ExtraRepos []dalec.PackageRepositoryConfig
// erofs-utils 1.7+ is required for tar support.
SysextSupported bool
}
func (*Config) BuildContainer ¶
func (*Config) BuildImageConfig ¶
func (*Config) DownloadDeps ¶
func (d *Config) DownloadDeps(worker llb.State, sOpt dalec.SourceOpts, spec *dalec.Spec, targetKey string, constraints dalec.PackageDependencyList, opts ...llb.ConstraintsOpt) llb.State
func (*Config) ExtractPkg ¶
func (*Config) HandleSourcePkg ¶
func (*Config) HandleWorker ¶
func (*Config) InstallBuildDeps ¶
func (d *Config) InstallBuildDeps(ctx context.Context, sOpt dalec.SourceOpts, spec *dalec.Spec, targetKey string, opts ...llb.ConstraintsOpt) llb.StateOption
func (*Config) InstallTestDeps ¶
func (d *Config) InstallTestDeps(sOpt dalec.SourceOpts, targetKey string, spec *dalec.Spec, opts ...llb.ConstraintsOpt) llb.StateOption
func (*Config) RepoMounts ¶
func (cfg *Config) RepoMounts(repos []dalec.PackageRepositoryConfig, sOpt dalec.SourceOpts, opts ...llb.ConstraintsOpt) llb.RunOption
func (*Config) Routes ¶ added in v0.21.0
Routes returns the flat routes for this DEB distro config, prefixed with the given prefix.
func (*Config) RunTests ¶
func (cfg *Config) RunTests(ctx context.Context, client gwclient.Client, sOpt dalec.SourceOpts, spec *dalec.Spec, targetKey string, opts ...llb.ConstraintsOpt) llb.StateOption
func (*Config) SysextWorker ¶
func (cfg *Config) SysextWorker(sOpts dalec.SourceOpts, opts ...llb.ConstraintsOpt) llb.State
func (*Config) Worker ¶
func (cfg *Config) Worker(sOpt dalec.SourceOpts, opts ...llb.ConstraintsOpt) llb.State