Add label to docker image Makefile

This ps adds the ability to add labels to the docker image at
build time

Change-Id: I6c24379f1d0884ba97c09da8fdd5c273a49cbd1e
This commit is contained in:
Stacey Fletcher 2018-02-17 15:26:09 -06:00 committed by Felipe Monteiro
parent 83dd22c715
commit 0d9d243a5d
1 changed files with 2 additions and 1 deletions

View File

@ -16,6 +16,7 @@ DECKHAND_IMAGE_NAME ?= deckhand
IMAGE_PREFIX ?= attcomdev
IMAGE_TAG ?= latest
HELM ?= helm
LABEL ?= commit-id
# Build Deckhand Docker image for this project
.PHONY: images
@ -39,7 +40,7 @@ dry-run: clean
# Make targets intended for use by the primary targets above.
.PHONY: build_deckhand
build_deckhand:
docker build -t $(IMAGE_PREFIX)/$(DECKHAND_IMAGE_NAME):$(IMAGE_TAG) .
docker build -t $(IMAGE_PREFIX)/$(DECKHAND_IMAGE_NAME):$(IMAGE_TAG) --label $(LABEL) .
.PHONY: clean
clean: