1
0

fix(container): prevent base image pull for non-registry containers

This commit is contained in:
2024-10-17 12:28:53 +00:00
parent 77547cedce
commit 2df0d81782
2 changed files with 11 additions and 1 deletions

View File

@ -178,6 +178,9 @@ type Container struct {
// Additional arguments
Args []string
// Base of container is local-only
LocalBase bool
Log zerolog.Logger
commandsOutput struct {
@ -428,7 +431,10 @@ func (c Container) build(imagePath string) (output string, err error) {
args := []string{"build"}
if !UseCache {
args = append(args, "--pull", "--no-cache")
if !c.LocalBase {
args = append(args, "--pull")
}
args = append(args, "--no-cache")
}
args = append(args, "-t", c.name, imagePath)