From 045aff4009d6db106cdfe1144bed240397e9c0ae Mon Sep 17 00:00:00 2001 From: "Grot (@grafanabot)" <43478413+grafanabot@users.noreply.github.com> Date: Wed, 22 Feb 2023 12:19:05 +0100 Subject: [PATCH] [v9.4.x] Add --init to all podman invocations to ensure ^C works on MacOS (#63552) [v9.4.x] Add --init to all podman invocations to ensure ^C works on MacOS (#61745) (cherry picked from commit 5f5f51b3bfba1d3b6f04847f15f81d6b78b97ce4) Signed-off-by: Jack Baldry Co-authored-by: Jack Baldry --- docs/Makefile | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/Makefile b/docs/Makefile index 96dc60c463f..9b692032fc1 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -1,8 +1,8 @@ .PHONY: pull docs docs-quick docs-no-pull docs-test docs-local-static -PODMAN = $(shell if command -v podman &>/dev/null; then echo podman; else echo docker; fi) +PODMAN = $(shell if command -v podman >/dev/null 2>&1; then echo podman; else echo docker; fi) IMAGE = grafana/docs-base:latest -CONTENT_PATH = /hugo/content/docs/grafana/next +CONTENT_PATH = /hugo/content/docs/grafana/latest LOCAL_STATIC_PATH = ../../website/static PORT = 3002:3002 @@ -10,19 +10,19 @@ pull: $(PODMAN) pull $(IMAGE) docs: pull - $(PODMAN) run -v $(shell pwd)/sources:$(CONTENT_PATH):Z -p $(PORT) --rm -it $(IMAGE) /bin/bash -c "make server" + $(PODMAN) run --init -v $(shell pwd)/sources:$(CONTENT_PATH):Z -p $(PORT) --rm -it $(IMAGE) make server docs-preview: pull - $(PODMAN) run -v $(shell pwd)/sources:$(CONTENT_PATH):Z -p $(PORT) --rm -it $(IMAGE) /bin/bash -c "make server BUILD_DRAFTS=true" + $(PODMAN) run --init -v $(shell pwd)/sources:$(CONTENT_PATH):Z -p $(PORT) --rm -it $(IMAGE) make server BUILD_DRAFTS=true docs-no-pull: - $(PODMAN) run -v $(shell pwd)/sources:$(CONTENT_PATH):Z -p $(PORT) --rm -it $(IMAGE) /bin/bash -c "make server" + $(PODMAN) run --init -v $(shell pwd)/sources:$(CONTENT_PATH):Z -p $(PORT) --rm -it $(IMAGE) make server docs-test: pull - $(PODMAN) run -v $(shell pwd)/sources:$(CONTENT_PATH):Z --rm -it $(IMAGE) /bin/bash -c 'make prod' + $(PODMAN) run --init -v $(shell pwd)/sources:$(CONTENT_PATH):Z --rm -it $(IMAGE) make prod # expects that you have grafana/website checked out in same path as the grafana repo. docs-local-static: pull if [ ! -d "$(LOCAL_STATIC_PATH)" ]; then echo "local path (website project) $(LOCAL_STATIC_PATH) not found"]; exit 1; fi - $(PODMAN) run -v $(shell pwd)/sources:$(CONTENT_PATH):Z \ + $(PODMAN) run --init -v $(shell pwd)/sources:$(CONTENT_PATH):Z \ -v $(shell pwd)/$(LOCAL_STATIC_PATH):/hugo/static:Z -p $(PORT) --rm -it $(IMAGE)