vendor c/common

Also update the e2e pull test to account for the changes when pulling
from the dir transport.  Images pulled via the dir transport are not
tagged anymore; the path is not a reliable source.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
This commit is contained in:
Valentin Rothberg
2022-01-10 13:47:12 +01:00
parent 6ed2c639ac
commit b7380a7c36
58 changed files with 641 additions and 348 deletions

View File

@ -48,6 +48,18 @@ const (
BoltDBStateStore RuntimeStateStore = iota
)
// ProxyEnv is a list of Proxy Environment variables
var ProxyEnv = []string{
"http_proxy",
"https_proxy",
"ftp_proxy",
"no_proxy",
"HTTP_PROXY",
"HTTPS_PROXY",
"FTP_PROXY",
"NO_PROXY",
}
// Config contains configuration options for container tools
type Config struct {
// Containers specify settings that configure how containers will run ont the system
@ -897,8 +909,7 @@ func (c *Config) GetDefaultEnvEx(envHost, httpProxy bool) []string {
if envHost {
env = append(env, os.Environ()...)
} else if httpProxy {
proxy := []string{"http_proxy", "https_proxy", "ftp_proxy", "no_proxy", "HTTP_PROXY", "HTTPS_PROXY", "FTP_PROXY", "NO_PROXY"}
for _, p := range proxy {
for _, p := range ProxyEnv {
if val, ok := os.LookupEnv(p); ok {
env = append(env, fmt.Sprintf("%s=%s", p, val))
}