func randomUniqString() string {
	var d [8]byte
	io.ReadFull(rand.Reader, d[:])
	str := hex.EncodeToString(d[:])
	return fmt.Sprintf("%x-%v", time.Now().Unix(), str)
}
/*
func (self *DockerTaskManager) pull(image string) error {
self.lock.Lock()
defer self.lock.Unlock()
cmd := exec.Command("docker", "pull", image)
err := cmd.Start()
if err != nil {
return err
}
return cmd.Wait()
}
package export
import (
	"crypto/rand"
	"encoding/hex"
	"fmt"
	"io"
	"sync"
	"time"
	"github.com/fsouza/go-dockerclient"
)
type DockerExporter struct {
	client *docker.Client
	lock   sync.Mutex
}
var endpoint = "unix:///var/run/docker.sock"
type ContainerExporter interface {
	Export(container string, w io.Writer) error
}
func NewDockerExporter() (ContainerExporter, error) {
	client, err := docker.NewClient(endpoint)
	if err != nil {
		return nil, err
	}
	return &DockerExporter{
		client: client,
	}, nil
}