func (d *Dim) AddLabel(parent string, labels []string, tag string) error {
	logrus.WithFields(logrus.Fields{"parent": parent, "labels": labels}).Debugln("Entering AddLabel")
	buildLabels := make(map[string]string)
	if len(labels) == 0 {
		return fmt.Errorf("No label provided")
	}
	for _, l := range labels {
		kv := strings.Split(l, "=")
		if len(kv) != 2 || kv[1] == "" {
			logrus.WithField("label", l).Infoln("Failed to parse given label")
			return fmt.Errorf("Failed to parse given label %s", l)
		}
		buildLabels[kv[0]] = kv[1]
	}
	var actualLabels map[string]string
	var err error
	if actualLabels, err = d.GetImageLabels(parent); err != nil {
		return err
	}
	if utils.MapMatchesAll(actualLabels, buildLabels) {
		return fmt.Errorf("Image %s already contains the label(s) you want to set", parent)
	}
	return d.Docker.ImageBuild(parent, buildLabels, tag)
}
AddLabel applies the given labels to the parent and tag the new created image with the given tag
package dim
import (
	"fmt"
	"io"
	"strings"
	"text/template"
	"github.com/Sirupsen/logrus"
	"time"
	"github.com/docker/engine-api/types"
	"github.com/nhurel/dim/lib/utils"
	"github.com/nhurel/dim/wrapper/dockerClient"
)
type Dim struct {
	Docker dockerClient.Docker
}