From 3530c61500654a1450196fc46932e31e7137c6a4 Mon Sep 17 00:00:00 2001 From: Trevor Whitney Date: Wed, 10 Apr 2024 17:00:11 -0600 Subject: [PATCH] chore: allow make docs to be run in container (#12563) --- Makefile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Makefile b/Makefile index ef8a13e5fd2a..119e6f801be7 100644 --- a/Makefile +++ b/Makefile @@ -804,7 +804,13 @@ check-format: format # Documentation related commands doc: ## Generates the config file documentation +ifeq ($(BUILD_IN_CONTAINER),true) + $(SUDO) docker run $(RM) $(TTY) -i \ + -v $(shell pwd):/src/loki$(MOUNT_FLAGS) \ + $(IMAGE_PREFIX)/loki-build-image:$(BUILD_IMAGE_VERSION) $@; +else go run ./tools/doc-generator $(DOC_FLAGS_TEMPLATE) > $(DOC_FLAGS) +endif docs: doc