{"action":"closed","issue":{"url":"https://api.github.com/repos/fsouza/go-dockerclient/issues/413","labels_url":"https://api.github.com/repos/fsouza/go-dockerclient/issues/413/labels{/name}","comments_url":"https://api.github.com/repos/fsouza/go-dockerclient/issues/413/comments","events_url":"https://api.github.com/repos/fsouza/go-dockerclient/issues/413/events","html_url":"https://github.com/fsouza/go-dockerclient/issues/413","id":116665045,"number":413,"title":"not pulling image from custom registry?","user":{"login":"mynameismevin","id":7537841,"avatar_url":"https://avatars.githubusercontent.com/u/7537841?v=3","gravatar_id":"","url":"https://api.github.com/users/mynameismevin","html_url":"https://github.com/mynameismevin","followers_url":"https://api.github.com/users/mynameismevin/followers","following_url":"https://api.github.com/users/mynameismevin/following{/other_user}","gists_url":"https://api.github.com/users/mynameismevin/gists{/gist_id}","starred_url":"https://api.github.com/users/mynameismevin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mynameismevin/subscriptions","organizations_url":"https://api.github.com/users/mynameismevin/orgs","repos_url":"https://api.github.com/users/mynameismevin/repos","events_url":"https://api.github.com/users/mynameismevin/events{/privacy}","received_events_url":"https://api.github.com/users/mynameismevin/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-11-12T23:24:21Z","updated_at":"2015-11-13T18:21:44Z","closed_at":"2015-11-13T18:21:44Z","body":"I cannot seem to pull from a custom registry. Am I doing it wrong? I know those images exist, I can download them manually.\r\n\r\n```go\r\npackage main\r\n\r\nimport (\r\n\t\"github.com/fsouza/go-dockerclient\"\r\n\tlog \"github.com/Sirupsen/logrus\"\r\n)\r\n\r\nfunc main() {\r\n\tlog.SetFormatter(&log.JSONFormatter{})\r\n\tlog.Infoln(\"pulling remote images.\")\r\n\tpull_images()\r\n\tlog.Infoln(\"done.\")\r\n}\r\n\r\nvar (\r\n\tgcr = \"gcr.io/google_containers/\"\r\n\r\n\tfluentd = docker.PullImageOptions{\r\n\t\tRepository: \"fluentd-elasticsearch\",\r\n\t\tRegistry: gcr,\r\n\t\tRawJSONStream: true,\r\n\t}\r\n    local_images = []docker.PullImageOptions{fluentd,{...}} // there is a long list of image, truncated for example.\r\n)\r\n\r\nfunc pull_images() {\r\n\t// empty config as it is not needed at this point.\r\n\tauth := docker.AuthConfiguration{}\r\n\r\n\tclient, err := docker.NewClientFromEnv()\r\n\tif err != nil {\r\n\t\tlog.Fatal(err)\r\n\t}\r\n\r\n\tfor _, image := range local_images {\r\n\t\tlog.Infof(\"pulling %s%s\", image.Registry, image.Repository)\r\n\t\terr = client.PullImage(image, auth)\r\n\t\tif err != nil {\r\n\t\t\tlog.Warnln(err)\r\n\t\t}\r\n\t}\r\n\r\n}\r\n```\r\n\r\nIt either hangs and doesn't complete, or it will pull an image from the core Docker registry instead of the Google registry.\r\n\r\nEdit:\r\n```bash\r\n16:25 misc $ docker version\r\nClient:\r\n Version:      1.8.3\r\n API version:  1.20\r\n Go version:   go1.5.1\r\n Git commit:   f4bf5c7\r\n Built:        Thu Oct 15 09:34:18 UTC 2015\r\n OS/Arch:      darwin/amd64\r\n\r\nServer:\r\n Version:      1.8.2\r\n API version:  1.20\r\n Go version:   go1.4.2\r\n Git commit:   0a8c2e3\r\n Built:        Thu Sep 10 19:10:10 UTC 2015\r\n OS/Arch:      linux/amd64\r\n16:26 misc $ docker-machine --version\r\ndocker-machine version 0.4.1 (e2c88d6)\r\n```"}}