-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMakefile
38 lines (30 loc) · 1.19 KB
/
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
36
37
38
#!/usr/bin/env make
.PHONY: install
install:
git submodule update --init --recursive
.PHONY: lint
lint:
hadolint Dockerfile
.PHONY: size
size:
dive artis3n/pgmodeler:$${TAG:-test}
.PHONY: test
test:
xhost +local:
mkdir -p /tmp/saves; touch /tmp/saves/exist.txt
dgoss run -it --rm -e DISPLAY --cap-drop=all -v /tmp/.X11-unix:/tmp/.X11-unix -v /tmp/saves:/app/savedwork artis3n/pgmodeler:$${TAG:-test}
CI=true dive artis3n/pgmodeler:$${TAG:-test}
xhost -local:
.PHONY: test-edit
test-edit:
mkdir -p /tmp/saves; touch /tmp/saves/exist.txt
dgoss edit -it --rm -e DISPLAY --cap-drop=all -v /tmp/.X11-unix:/tmp/.X11-unix -v $$(xauth info | grep "Authority file" | awk '{ print $$3 }'):/home/modeler/.Xauthority:ro -v /tmp/saves:/app/savedwork artis3n/pgmodeler:$${TAG:-test}
.PHONY: build
build:
docker build . -t artis3n/pgmodeler:$${TAG:-test}
.PHONY: build-ci
build-ci:
docker build --progress plain . -t artis3n/pgmodeler:$${TAG:-test}
.PHONY: run
run:
docker run -it --rm -e DISPLAY --cap-drop=all -v /tmp/.X11-unix:/tmp/.X11-unix -v $$(xauth info | grep "Authority file" | awk '{ print $$3 }'):/home/modeler/.Xauthority:ro -v $${WORK:-~/Documents}:/app/savedwork artis3n/pgmodeler:$${TAG:-test}