Skip to content

Commit

Permalink
Merge pull request moby#9 from crosbymichael/add-pull
Browse files Browse the repository at this point in the history
Add pull method
  • Loading branch information
crosbymichael committed May 8, 2014
2 parents 8980ee4 + 59633a5 commit 6005a9e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions dockerclient.go
Expand Up @@ -176,3 +176,13 @@ func (client *DockerClient) Version() (*Version, error) {
}
return version, nil
}

func (client *DockerClient) PullImage(name, tag string) error {
v := url.Values{}
v.Set("fromImage", name)
if tag != "" {
v.Set("tag", tag)
}
_, err := client.doRequest("POST", "/v1.10/images/create?="+v.Encode(), nil)
return err
}

0 comments on commit 6005a9e

Please sign in to comment.