mirror of
https://github.com/containers/podman.git
synced 2025-07-01 16:17:06 +08:00
Vendor in latest containers/image
Fixes podman pull to pull a public image even if $XDG_RUNTIME_DIR does not exist for authentication. Public images don't require credentials to access. Signed-off-by: umohnani8 <umohnani@redhat.com> Closes: #701 Approved by: rhatdan
This commit is contained in:
@ -10,7 +10,7 @@ github.com/containerd/cgroups 7a5fdd8330119dc70d850260db8f3594d89d6943
|
|||||||
github.com/containerd/continuity master
|
github.com/containerd/continuity master
|
||||||
github.com/containernetworking/cni v0.4.0
|
github.com/containernetworking/cni v0.4.0
|
||||||
github.com/containernetworking/plugins master
|
github.com/containernetworking/plugins master
|
||||||
github.com/containers/image e51d350816912bbd09a91f690cd394b6225c043d
|
github.com/containers/image 88423e35d5f11939b0db4fb8f2939fc04adf2463
|
||||||
github.com/containers/storage ce923c1ed9e51c8fe58e41a86abc05be7b824f62
|
github.com/containers/storage ce923c1ed9e51c8fe58e41a86abc05be7b824f62
|
||||||
github.com/coreos/go-systemd v14
|
github.com/coreos/go-systemd v14
|
||||||
github.com/cri-o/ocicni master
|
github.com/cri-o/ocicni master
|
||||||
@ -89,6 +89,6 @@ k8s.io/utils 258e2a2fa64568210fbd6267cf1d8fd87c3cb86e https://github.com/kuberne
|
|||||||
github.com/mrunalp/fileutils master
|
github.com/mrunalp/fileutils master
|
||||||
github.com/varlink/go master https://github.com/varlink/go
|
github.com/varlink/go master https://github.com/varlink/go
|
||||||
github.com/projectatomic/buildah master https://github.com/projectatomic/buildah
|
github.com/projectatomic/buildah master https://github.com/projectatomic/buildah
|
||||||
vendor/github.com/Nvveen/Gotty master
|
github.com/Nvveen/Gotty master
|
||||||
github.com/fsouza/go-dockerclient master
|
github.com/fsouza/go-dockerclient master
|
||||||
github.com/openshift/imagebuilder master
|
github.com/openshift/imagebuilder master
|
||||||
|
13
vendor/github.com/containers/image/pkg/docker/config/config.go
generated
vendored
13
vendor/github.com/containers/image/pkg/docker/config/config.go
generated
vendored
@ -15,6 +15,7 @@ import (
|
|||||||
"github.com/docker/docker-credential-helpers/credentials"
|
"github.com/docker/docker-credential-helpers/credentials"
|
||||||
"github.com/docker/docker/pkg/homedir"
|
"github.com/docker/docker/pkg/homedir"
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
|
"github.com/sirupsen/logrus"
|
||||||
)
|
)
|
||||||
|
|
||||||
type dockerAuthConfig struct {
|
type dockerAuthConfig struct {
|
||||||
@ -64,11 +65,17 @@ func GetAuthentication(sys *types.SystemContext, registry string) (string, strin
|
|||||||
}
|
}
|
||||||
|
|
||||||
dockerLegacyPath := filepath.Join(homedir.Get(), dockerLegacyCfg)
|
dockerLegacyPath := filepath.Join(homedir.Get(), dockerLegacyCfg)
|
||||||
|
var paths []string
|
||||||
pathToAuth, err := getPathToAuth(sys)
|
pathToAuth, err := getPathToAuth(sys)
|
||||||
if err != nil {
|
if err == nil {
|
||||||
return "", "", err
|
paths = append(paths, pathToAuth)
|
||||||
|
} else {
|
||||||
|
// Error means that the path set for XDG_RUNTIME_DIR does not exist
|
||||||
|
// but we don't want to completely fail in the case that the user is pulling a public image
|
||||||
|
// Logging the error as a warning instead and moving on to pulling the image
|
||||||
|
logrus.Warnf("%v: Trying to pull image in the event that it is a public image.", err)
|
||||||
}
|
}
|
||||||
paths := [3]string{pathToAuth, filepath.Join(homedir.Get(), dockerCfg, dockerCfgFileName), dockerLegacyPath}
|
paths = append(paths, filepath.Join(homedir.Get(), dockerCfg, dockerCfgFileName), dockerLegacyPath)
|
||||||
|
|
||||||
for _, path := range paths {
|
for _, path := range paths {
|
||||||
legacyFormat := path == dockerLegacyPath
|
legacyFormat := path == dockerLegacyPath
|
||||||
|
Reference in New Issue
Block a user