diff options
author | Wojtek Kosior <koszko@koszko.org> | 2022-11-21 21:26:01 +0100 |
---|---|---|
committer | Wojtek Kosior <koszko@koszko.org> | 2022-11-21 21:48:21 +0100 |
commit | d9e2c6ca4b22257820028df3adcd9bd290c12e24 (patch) | |
tree | ed7be4d4a941d4709ef0c279033576f44957b61f /Makefile | |
parent | 76090eb283086b06aa57375be965a9e03686a08e (diff) | |
download | koszko-org-server-d9e2c6ca4b22257820028df3adcd9bd290c12e24.tar.gz koszko-org-server-d9e2c6ca4b22257820028df3adcd9bd290c12e24.zip |
make container write logs to a directory shared with host
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -25,6 +25,8 @@ GUIX_SHELL = $(GUIX_TM) shell KOSZKO_ORG_WEBSITE_INFO = \ subrepos/koszko-org-website/src/koszko_org_website.egg-info/PKG-INFO +LOGDIR = "/tmp/$$(pwd | sed 's|/|!|g')!log" + all: | container-runner.touchfile log $(KOSZKO_ORG_WEBSITE_INFO): @@ -43,18 +45,18 @@ hosts: hosts-extra /etc/hosts cat $^ > $@ log: - mkdir -p log + ln -sf $(LOGDIR) $@ start-container: guix-container.sh container-runner.touchfile | log - unshare --mount ./run-with-fake-mounts.sh \ - ./$< start -e ./container-runner -p ./pidfile -l ./log + unshare --mount ./run-with-fake-mounts.sh $(LOGDIR) \ + ./$< start -e ./container-runner -p ./pidfile -l $(LOGDIR) stop-container: guix-container.sh ./$< stop -e ./container-runner -p ./pidfile restart-container: guix-container.sh container-runner.touchfile | log - unshare --mount ./run-with-fake-mounts.sh \ - ./$< restart -e ./container-runner -p ./pidfile -l ./log + unshare --mount ./run-with-fake-mounts.sh $(LOGDIR) \ + ./$< restart -e ./container-runner -p ./pidfile -l $(LOGDIR) enter-container: pidfile nsenter -a -t "$$(cat pidfile)" \ |