From bec0ccb7b6a56f25a9afd660f562ee839f24286c Mon Sep 17 00:00:00 2001 From: Gergely Csatari Date: Thu, 10 Sep 2026 17:29:19 +0300 Subject: [PATCH] Fixing Makefile to support Podman on WSL Signed-off-by: Gergely Csatari --- Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 2c1ff26..d596594 100644 --- a/Makefile +++ b/Makefile @@ -4,12 +4,17 @@ PORT ?= 8000 ifeq ($(shell command -v docker 2> /dev/null),) RUNTIME=podman + # Rootless Podman uses pasta. `-p ${PORT}:${PORT}` publishes on IPv6 as well, + # but pasta resets connections to [::1], so http://localhost:${PORT} fails + # (typical in WSL). Bind IPv4 loopback only so browsers fall back to 127.0.0.1. + PUBLISH_ARGS=-p 127.0.0.1:${PORT}:${PORT} else RUNTIME=docker + PUBLISH_ARGS=-p ${PORT}:${PORT} endif docker-run: pull-config-server generate-template - $(RUNTIME) run --rm --name sdc-docs -v "$$(pwd)":/docs -p ${PORT}:${PORT} --entrypoint ash squidfunk/mkdocs-material:${MKDOCS_MATERIAL_VERSION} -c 'mkdocs serve -a 0.0.0.0:${PORT}' + $(RUNTIME) run --rm --name sdc-docs -v "$$(pwd)":/docs $(PUBLISH_ARGS) --entrypoint ash squidfunk/mkdocs-material:${MKDOCS_MATERIAL_VERSION} -c 'mkdocs serve -a 0.0.0.0:${PORT}' generate-template: export $$(cat versions.env | xargs) ; envsubst < docs/user-guide/troubleshooting.tmpl.md > docs/user-guide/troubleshooting.md