|
@@ -425,15 +425,19 @@ func (srv *Server) CmdPush(stdin io.ReadCloser, stdout io.Writer, args ...string
|
|
remote = local
|
|
remote = local
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ Debugf("Pushing [%s] to [%s]\n", local, remote)
|
|
|
|
+
|
|
// Try to get the image
|
|
// Try to get the image
|
|
// FIXME: Handle lookup
|
|
// FIXME: Handle lookup
|
|
// FIXME: Also push the tags in case of ./docker push myrepo:mytag
|
|
// FIXME: Also push the tags in case of ./docker push myrepo:mytag
|
|
// img, err := srv.runtime.LookupImage(cmd.Arg(0))
|
|
// img, err := srv.runtime.LookupImage(cmd.Arg(0))
|
|
img, err := srv.runtime.graph.Get(local)
|
|
img, err := srv.runtime.graph.Get(local)
|
|
if err != nil {
|
|
if err != nil {
|
|
|
|
+ Debugf("The push refers to a repository [%s] (len: %d)\n", local, len(srv.runtime.repositories.Repositories[local]))
|
|
|
|
+
|
|
// If it fails, try to get the repository
|
|
// If it fails, try to get the repository
|
|
if localRepo, exists := srv.runtime.repositories.Repositories[local]; exists {
|
|
if localRepo, exists := srv.runtime.repositories.Repositories[local]; exists {
|
|
- fmt.Fprintf(stdout, "Pushing %s (%d images) on %s...\n", local, len(localRepo), remote)
|
|
|
|
|
|
+ fmt.Fprintf(stdout, "Pushing %s (%d tags) on %s...\n", local, len(localRepo), remote)
|
|
if err := srv.runtime.graph.PushRepository(remote, localRepo, srv.runtime.authConfig); err != nil {
|
|
if err := srv.runtime.graph.PushRepository(remote, localRepo, srv.runtime.authConfig); err != nil {
|
|
return err
|
|
return err
|
|
}
|
|
}
|