Skip to content

Commit 311ea9f

Browse files
committed
Add Dockerfile
1 parent e7192f3 commit 311ea9f

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

python_test_example/Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
FROM python:3.7-slim
2+
3+
RUN pip install --no-cache-dir --upgrade pip setuptools wheel \
4+
&& pip install --no-cache-dir requests flask

python_test_example/Makefile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
image = unittest
2+
tag = 0.1.0
3+
curdir := `pwd`
4+
5+
.PHONY: dbuild
6+
dbuild:
7+
docker build -t $(image):$(tag) .
8+
9+
.PHONY: drun
10+
drun:
11+
docker run --rm -it -v $(curdir):/opt -w /opt $(image):$(tag) bash
12+
13+
.PHONY: all_test
14+
all_test:
15+
python3 -m unittest discover --verbose --pattern "*_test.py"

0 commit comments

Comments
 (0)