Browse Source

Add labels to Docker Build process

Adding the ability to add a label to the docker image at build
time

Change-Id: I96a4800256af164de140f4554ab9b09d8c2e6722
changes/87/569187/1
Stacey Fletcher 4 years ago
committed by Bryan Strassner
parent
commit
17c3fb0eec
  1. 6
      Makefile

6
Makefile

@ -17,7 +17,7 @@ IMAGE_PREFIX ?= attcomdev
IMAGE_TAG ?= latest
SHIPYARD_IMAGE_NAME ?= shipyard
HELM ?= helm
LABEL ?= commit-id
# Build all docker images for this project
.PHONY: images
images: build_airflow build_shipyard
@ -56,11 +56,11 @@ run_airflow: clean build_airflow
.PHONY: build_airflow
build_airflow:
docker build -t $(IMAGE_PREFIX)/$(AIRFLOW_IMAGE_NAME):$(IMAGE_TAG) images/airflow/
docker build -t $(IMAGE_PREFIX)/$(AIRFLOW_IMAGE_NAME):$(IMAGE_TAG) --label $(LABEL) images/airflow/
.PHONY: build_shipyard
build_shipyard:
docker build -t $(IMAGE_PREFIX)/$(SHIPYARD_IMAGE_NAME):$(IMAGE_TAG) -f images/shipyard/Dockerfile .
docker build -t $(IMAGE_PREFIX)/$(SHIPYARD_IMAGE_NAME):$(IMAGE_TAG) --label $(LABEL) -f images/shipyard/Dockerfile .
.PHONY: clean
clean:

Loading…
Cancel
Save