mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Added support for REPO:TAG format in docker pull (overrides -t option)
This commit is contained in:
parent
1c76f91fc4
commit
e81a53eea9
1 changed files with 6 additions and 1 deletions
|
@ -565,6 +565,12 @@ func (srv *Server) CmdPull(stdin io.ReadCloser, stdout io.Writer, args ...string
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if strings.Contains(remote, ":") {
|
||||||
|
remoteParts := strings.Split(remote, ":")
|
||||||
|
tag = &remoteParts[1]
|
||||||
|
remote = remoteParts[0]
|
||||||
|
}
|
||||||
|
|
||||||
// FIXME: CmdPull should be a wrapper around Runtime.Pull()
|
// FIXME: CmdPull should be a wrapper around Runtime.Pull()
|
||||||
if *registry != "" {
|
if *registry != "" {
|
||||||
if err := srv.runtime.graph.PullImage(stdout, remote, *registry, nil); err != nil {
|
if err := srv.runtime.graph.PullImage(stdout, remote, *registry, nil); err != nil {
|
||||||
|
@ -572,7 +578,6 @@ func (srv *Server) CmdPull(stdin io.ReadCloser, stdout io.Writer, args ...string
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
// FIXME: Allow pull repo:tag
|
|
||||||
if err := srv.runtime.graph.PullRepository(stdout, remote, *tag, srv.runtime.repositories, srv.runtime.authConfig); err != nil {
|
if err := srv.runtime.graph.PullRepository(stdout, remote, *tag, srv.runtime.repositories, srv.runtime.authConfig); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue