func (d *Controller) OnlyLocalkubeCtr() (ctrId string, running bool, err error) {
	ctrs, err := d.ListLocalkubeCtrs(true)
	if err != nil {
		return "", false, err
	} else if len(ctrs) < 1 {
		return "", false, ErrNoContainer
	} else if len(ctrs) > 1 {
		return "", false, ErrTooManyLocalkubes
	}
	ctr := ctrs[0]
	return ctr.ID, runningStatus(ctr.Status), nil
}
OnlyLocalkubeCtr returns the localkube container. If there are multiple possible containers an error is returned
package localkubectl
import (
	"errors"
	"fmt"
	"io"
	"log"
	"strings"
	"github.com/docker/docker/pkg/jsonmessage"
	"github.com/docker/docker/pkg/term"
	docker "github.com/fsouza/go-dockerclient"
)
var (
	LocalkubeLabel = "rsprd.com/name=localkube"
	LocalkubeContainerName = "localkube"
	LocalkubeImageName = "redspreadapps/localkube"
	ContainerDataDir = "/var/localkube/data"
	RedspreadName = "rsprd.com/name"
)
type Controller struct {
	*docker.Client
	log *log.Logger
	out io.Writer
}
func NewController(client *docker.Client, out io.Writer) (*Controller, error) {
	_, err := client.Version()
	if err != nil {
		return nil, fmt.Errorf("Unable to establish connection with Docker daemon: %v", err)
	}
	logger := log.New(out, "", 0)
	return &Controller{
		Client: client,
		log:    logger,
		out:    out,
	}, nil
}
func NewControllerFromEnv(out io.Writer) (*Controller, error) {
	client, err := docker.NewClientFromEnv()
	if err != nil {
		return nil, fmt.Errorf("could not create Docker client: %v", err)
	}
	return NewController(client, out)
}
func (d *Controller) ListLocalkubeCtrs(all bool) ([]docker.APIContainers, error) {
	ctrs, err := d.ListContainers(docker.ListContainersOptions{
		All: all,
		Filters: map[string][]string{
			"label": {LocalkubeLabel},
		},
	})
	if err != nil {
		return nil, fmt.Errorf("could not list containers: %v", err)
	}
	return ctrs, nil
}