Allow to pull from multiple repositories

Adds a new cli flag to luet build `--pull-repository` which allows to
pass-by a list of docker image references which are used to pull the
cache from

Fixes #185
Fixes #184
Closes #161
This commit is contained in:
Ettore Di Giacinto
2021-04-07 15:54:38 +02:00
parent 88307b1912
commit ec19b34ca8
4 changed files with 169 additions and 85 deletions

View File

@@ -49,7 +49,8 @@ type CompilerBackendOptions struct {
}
type CompilerOptions struct {
ImageRepository string
PushImageRepository string
PullImageRepository []string
PullFirst, KeepImg, Push bool
Concurrency int
CompressionType CompressionImplementation
@@ -65,14 +66,14 @@ type CompilerOptions struct {
func NewDefaultCompilerOptions() *CompilerOptions {
return &CompilerOptions{
ImageRepository: "luet/cache",
PullFirst: false,
Push: false,
CompressionType: None,
KeepImg: true,
Concurrency: runtime.NumCPU(),
OnlyDeps: false,
NoDeps: false,
PushImageRepository: "luet/cache",
PullFirst: false,
Push: false,
CompressionType: None,
KeepImg: true,
Concurrency: runtime.NumCPU(),
OnlyDeps: false,
NoDeps: false,
}
}