Skip to content

Commit a431ee2

Browse files
authored
chore(make): loki-local-image make target for building images on local machines (#15562)
1 parent 169ea28 commit a431ee2

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

‎Makefile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -633,6 +633,14 @@ loki-debug-image: ## build the loki debug docker image
633633
loki-push: loki-image-cross
634634
$(call push-image,loki)
635635

636+
# Loki local images
637+
# Default architecture for local builds
638+
LOCAL_ARCH ?= amd64
639+
640+
# Loki local image
641+
loki-local-image: ## build the loki docker image locally (set LOCAL_ARCH=arm64 for arm64)
642+
$(OCI_BUILD) --load --platform=linux/$(LOCAL_ARCH) -t $(LOKI_IMAGE) -f cmd/loki/Dockerfile .
643+
636644
# Canary image
637645
loki-canary-image: ## build the canary docker image
638646
$(OCI_BUILD) -t $(LOKI_CANARY_IMAGE) -f cmd/loki-canary/Dockerfile .

0 commit comments

Comments
 (0)