diff --git a/Makefile b/Makefile index a0aff57..0d9b8ff 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ VERSION=1.2 SHELL=/bin/bash -PROFILE=diva-e +PROFILE=default OPT= .PHONY: info @@ -12,10 +12,14 @@ info: build: podman build -t teams-pwa:$(VERSION) . +setup: + mkdir -p "/var/spool/teams-pwa/$(PROFILE)" + run-bg: $(MAKE) run OPT="-d" run: + [ -d "/var/spool/teams-pwa/$(PROFILE)" ] || $(MAKE) setup podman run $(OPT) -it \ --rm \ --net host \ @@ -32,7 +36,7 @@ run: --device /dev/dri \ -v /dev/shm:/dev/shm \ --name teams-pwa-$(PROFILE) \ - teams-pwa:$(VERSION) + teams-pwa:$(VERSION) $(ARGS) stop: podman stop teams-pwa-$(PROFILE) diff --git a/README.md b/README.md new file mode 100644 index 0000000..ca5a536 --- /dev/null +++ b/README.md @@ -0,0 +1,27 @@ +# run Teams in a podman container + +## requirements + +* podman +* make + + +## usage + +```bash +# run in background +make run-bg PROFILE=my-profile + +# stop container +make stop PROFILE=my-profile +``` + +## why? + +Whenever you try to run multiple instances of Chromium (and Chrome), the second +instance detects it's already running and instead of creating a new, independent +process, it attaches to the already running instance. + +While this mechanism saves a bunch of memory, for some use cases this is +counter-productive, eg. if you need to change global browser settings for +testing/developing purpose while you're running Teams.