-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
35 lines (25 loc) · 919 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
PROJECT := adi_to_qrz
.PHONY: build run clean distrib
all: build test
build:
cp -a requirements.txt requirements.txt.nodebug
echo "flake8\npylint" >> requirements.txt
docker build . -f Dockerfile -t $(PROJECT)
docker tag $(PROJECT) $(PROJECT):latest
mv requirements.txt.nodebug requirements.txt
test:
# run & test the code backed into the container
docker run --entrypoint=/bin/bash -w /app -ti $(PROJECT):latest ".tests/run.sh"
localtest:
# run tests on the local code
docker run --entrypoint=/bin/bash -v $(PWD):/app -w /app -ti $(PROJECT):latest ".tests/run.sh"
run:
docker run $(PROJECT)
build-nc:
docker build . -f Dockerfile -t $(PROJECT) --no-cache --pull
docker tag $(PROJECT) $(PROJECT):latest
shell:
docker run --entrypoint=/bin/bash -ti $(PROJECT):latest
localshell:
# start a shell & bind the local dir as /app
docker run --entrypoint=/bin/bash -v $(PWD):/app -ti $(PROJECT):latest