mirror of
https://github.com/containers/podman.git
synced 2025-06-29 23:22:40 +08:00
pull: get registries using the registries pkg
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
@ -4,7 +4,6 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"os"
|
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
cp "github.com/containers/image/copy"
|
cp "github.com/containers/image/copy"
|
||||||
@ -277,12 +276,7 @@ func (i *Image) createNamesToPull() ([]*pullStruct, error) {
|
|||||||
pullNames = append(pullNames, &ps)
|
pullNames = append(pullNames, &ps)
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
registryConfigPath := ""
|
searchRegistries, err := registries.GetRegistries()
|
||||||
envOverride := os.Getenv("REGISTRIES_CONFIG_PATH")
|
|
||||||
if len(envOverride) > 0 {
|
|
||||||
registryConfigPath = envOverride
|
|
||||||
}
|
|
||||||
searchRegistries, err := sysregistries.GetRegistries(&types.SystemContext{SystemRegistriesConfPath: registryConfigPath})
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user