fix panic with podman pull

when there are no registries configured for the system and the user provided
a short image name, we panic'd due a logic bug in recent image pull changes.

Signed-off-by: baude <bbaude@redhat.com>

Closes: #841
Approved by: rhatdan
This commit is contained in:
baude
2018-05-29 11:32:41 -05:00
committed by Atomic Bot
parent 81d6f082f3
commit 0eda60957d
5 changed files with 49 additions and 17 deletions

View File

@@ -30,13 +30,13 @@ func newDockerClient(sys *types.SystemContext) (*dockerclient.Client, error) {
//
// Similarly, if we want to communicate over plain HTTP on a TCP socket, we also need to set
// TLSClientConfig to nil. This can be achieved by using the form `http://`
proto, _, _, err := dockerclient.ParseHost(host)
url, err := dockerclient.ParseHostURL(host)
if err != nil {
return nil, err
}
var httpClient *http.Client
if proto != "unix" {
if proto == "http" {
if url.Scheme != "unix" {
if url.Scheme == "http" {
httpClient = httpConfig()
} else {
hc, err := tlsConfig(sys)