From c9f410ea719673639e2832893030de9a5992f094 Mon Sep 17 00:00:00 2001 From: jacwil Date: Sat, 18 May 2024 20:21:58 -0700 Subject: [PATCH] feat: Support `IMAGE_TAG` build variable --- Makefile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index dbc7a9f4..baa27d76 100644 --- a/Makefile +++ b/Makefile @@ -1,12 +1,14 @@ rand := $(shell openssl rand -hex 6) +export IMAGE_TAG := $(if $(IMAGE_TAG),$(IMAGE_TAG),latest) + .PHONY: docker-dev-build docker-dev-build: - docker build -f ./Dockerfile-dev -t oryd/kratos-selfservice-ui-node:latest . + docker build -f ./Dockerfile-dev -t oryd/kratos-selfservice-ui-node:${IMAGE_TAG} . .PHONY: docker docker: - docker build -t oryd/kratos-selfservice-ui-node:latest . + docker build -t oryd/kratos-selfservice-ui-node:${IMAGE_TAG} . .PHONY: build-sdk build-sdk: @@ -34,7 +36,7 @@ publish-sdk: build-sdk .PHONY: build-sdk-docker build-sdk-docker: build-sdk - docker build -t oryd/kratos-selfservice-ui-node:latest . --build-arg LINK=true + docker build -t oryd/kratos-selfservice-ui-node:${IMAGE_TAG} . --build-arg LINK=true .PHONY: clean-sdk clean-sdk: