mirror of
https://github.com/mcuadros/ascode
synced 2024-11-23 01:11:59 +01:00
starlark/module: experimental/docker DOCKER_CONFIG support
This commit is contained in:
parent
c5436f7b86
commit
ede2cc43f7
@ -4,6 +4,7 @@ import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"os"
|
||||
"sort"
|
||||
"sync"
|
||||
|
||||
@ -131,7 +132,7 @@ func (i *image) getTags() (*starlark.List, error) {
|
||||
}
|
||||
|
||||
var err error
|
||||
i.tags, err = docker.GetRepositoryTags(context.TODO(), nil, i.ref)
|
||||
i.tags, err = docker.GetRepositoryTags(context.TODO(), imageSystemContext(), i.ref)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("error listing repository tags: %v", err)
|
||||
}
|
||||
@ -226,3 +227,9 @@ func versionToList(versions []*semver.Version, other []string) []string {
|
||||
|
||||
return append(output, other...)
|
||||
}
|
||||
|
||||
func imageSystemContext() *types.SystemContext {
|
||||
return &types.SystemContext{
|
||||
AuthFilePath: os.Getenv("DOCKER_CONFIG"),
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user