Work on podman rootless compatibility

This commit is contained in:
Christian Reitter 2024-12-19 21:40:29 +01:00
parent d6c43fe7af
commit 9b918455a4
1 changed files with 5 additions and 2 deletions

View File

@ -1,6 +1,9 @@
# flexible use with docker and podman
platform ?= docker
container_workdir = /home/builder/workdir/
# useful option: "--userns=keep-id"
# platform_extra_options
.PHONY: build
build:
@ -36,8 +39,8 @@ build-dev:
.PHONY: dev
dev: build-dev
$(platform) run --rm --expose 4000 -p 127.0.0.1:4000:4000 --mount type=bind,source=${PWD},target=${container_workdir} -it dev-milksad-website jekyll serve -H 0.0.0.0
$(platform) run --rm --expose 4000 -p 127.0.0.1:4000:4000 --mount type=bind,source=${PWD},target=${container_workdir} $(platform_extra_options) -it dev-milksad-website jekyll serve -H 0.0.0.0
.PHONY: dev-shell
dev-shell: build-dev
$(platform) run --rm --expose 4000 -p 127.0.0.1:4000:4000 --mount type=bind,source=${PWD},target=${container_workdir} -it dev-milksad-website sh
$(platform) run --rm --expose 4000 -p 127.0.0.1:4000:4000 --mount type=bind,source=${PWD},target=${container_workdir} $(platform_extra_options) -it dev-milksad-website sh