mirror of
https://github.com/containers/podman.git
synced 2025-07-15 03:02:52 +08:00
Use HTTPProxy settings from containers.conf
This PR takes the settings from containers.conf and uses them. This works on the podman local but does not fix the issue for podman remote or for APIv2. We need a way to specify optionalbooleans when creating containers. Fixes: https://github.com/containers/podman/issues/8843 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
13
vendor/github.com/containers/common/pkg/auth/auth.go
generated
vendored
13
vendor/github.com/containers/common/pkg/auth/auth.go
generated
vendored
@ -16,10 +16,17 @@ import (
|
||||
"golang.org/x/crypto/ssh/terminal"
|
||||
)
|
||||
|
||||
// GetDefaultAuthFile returns env value REGISTRY_AUTH_FILE as default --authfile path
|
||||
// used in multiple --authfile flag definitions
|
||||
// GetDefaultAuthFile returns env value REGISTRY_AUTH_FILE as default
|
||||
// --authfile path used in multiple --authfile flag definitions
|
||||
// Will fail over to DOCKER_CONFIG if REGISTRY_AUTH_FILE environment is not set
|
||||
func GetDefaultAuthFile() string {
|
||||
return os.Getenv("REGISTRY_AUTH_FILE")
|
||||
authfile := os.Getenv("REGISTRY_AUTH_FILE")
|
||||
if authfile == "" {
|
||||
if authfile, ok := os.LookupEnv("DOCKER_CONFIG"); ok {
|
||||
logrus.Infof("Using DOCKER_CONFIG environment variable for authfile path %s", authfile)
|
||||
}
|
||||
}
|
||||
return authfile
|
||||
}
|
||||
|
||||
// CheckAuthFile validates filepath given by --authfile
|
||||
|
Reference in New Issue
Block a user