izar / pytm

A Pythonic framework for threat modeling
Other
876 stars 165 forks source link

docker and makefile broken #196

Closed ido-krupkin-zooz closed 2 years ago

ido-krupkin-zooz commented 2 years ago

hi the diffs to fix it


index 7622a28..04f65ef 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,5 +1,5 @@

-FROM python:3.11-rc-slim
+FROM python:3.9.13-alpine3.16

 WORKDIR /usr/src/app
diff --git a/Makefile b/Makefile
index 5e5afbc..dc4595c 100644
--- a/Makefile
+++ b/Makefile
@@ -3,8 +3,8 @@ CWD := $(patsubst %/,%,$(dir $(MKFILE_PATH)))
 DOCKER_IMG := pytm

 ifeq ($(USE_DOCKER),true)
-       SHELL=docker
-       .SHELLFLAGS=run -u $$(id -u) -v $(CWD):/usr/src/app --rm $(DOCKER_IMG):latest -c
+       SHELL=/bin/bash
+       .SHELLFLAGS=docker run -u $$(id -u) -v $(CWD):/usr/src/app --rm $(DOCKER_IMG):latest -c
 endif

 -%/report.html: %.py tm $(libs) docs/template.md docs/Stylesheet.css
-       ./$< --report docs/template.md | pandoc -f markdown -t html > $@
+%/report.html: %.py tm $(libs) docs/basic_template.md docs/Stylesheet.css
+       ./$< --report docs/basic_template.md | pandoc -f markdown -t html > $@
xee5ch commented 2 years ago

Woops, I didn't notice this until looking for another issue, but I found the same. This can be resolved with #197, although granted you have some more useful shell modifications in the Makefile I didn't include.