From f8a7eafa745d8deac7ff49aea5c6311d9e696c17 Mon Sep 17 00:00:00 2001 From: Mikkel Oscar Lyderik Larsen Date: Fri, 14 Sep 2018 19:29:16 +0200 Subject: [PATCH] Allow configuring docker image when running make Signed-off-by: Mikkel Oscar Lyderik Larsen --- Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 3af3c2145a..55398a8e64 100644 --- a/Makefile +++ b/Makefile @@ -14,6 +14,7 @@ .PHONY: build-linux clean docker docker-build lint unit-test vet +IMAGE ?= amazon/amazon-k8s-cni VERSION ?= $(shell git describe --tags --always --dirty) LDFLAGS ?= -X main.version=$(VERSION) @@ -31,8 +32,8 @@ docker-build: # Build docker image docker: docker-build - @docker build -f scripts/dockerfiles/Dockerfile.release -t "amazon/amazon-k8s-cni:$(VERSION)" . - @echo "Built Docker image \"amazon/amazon-k8s-cni:$(VERSION)\"" + @docker build -f scripts/dockerfiles/Dockerfile.release -t "$(IMAGE):$(VERSION)" . + @echo "Built Docker image \"$(IMAGE):$(VERSION)\"" # unit-test unit-test: