code: func (e *ClientExecutor) CopyContainer(container *docker.Container, excludes []string, copies ...imagebuilder.Copy) error {
  	for _, c := range copies {
  		// TODO: reuse source
  		for _, src := range c.Src {
  			glog.V(4).Infof("Archiving %s download=%t fromFS=%t from=%s", src, c.Download, c.FromFS, c.From)
  			var r io.Reader
  			var closer io.Closer
  			var err error
  			if len(c.From) > 0 {
  				r, closer, err = e.archiveFromContainer(c.From, src, c.Dest)
  			} else {
  				r, closer, err = e.Archive(c.FromFS, src, c.Dest, c.Download, excludes)
  			}
  			if err != nil {
  				return err
  			}
  
  			glog.V(5).Infof("Uploading to %s at %s", container.ID, c.Dest)
  			if glog.V(6) {
  				logArchiveOutput(r, "Archive file for %s")
  			}
  			err = e.Client.UploadToContainer(container.ID, docker.UploadToContainerOptions{
  				InputStream: r,
  				Path:        "/",
  			})
  			if err := closer.Close(); err != nil {
  				glog.Errorf("Error while closing stream container copy stream %s: %v", container.ID, err)
  			}
  			if err != nil {
  				return err
  			}
  		}
  	}
  	return nil
  }
docs: // CopyContainer copies the provided content into a destination container.