forked from andrespp/docker-pdi
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
32 lines (28 loc) · 705 Bytes
/
Makefile
File metadata and controls
32 lines (28 loc) · 705 Bytes
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
IMAGE=pdi
APP=spoon
.PHONY: help
help:
@echo "Usage: make [target]"
@echo
@echo "Targets:"
@echo " help\t\tPrint this help"
@echo " test\t\tLookup for docker and docker-compose binaries"
@echo " setup\t\tBuild docker images"
@echo " run [app]\tRun app defined in '\$$APP' (spoon by default)"
@echo ""
@echo "Example: make run APP=spoon"
.PHONY: test
test:
@which docker
@which docker-compose
@which xauth
.PHONY: setup
setup: Dockerfile
docker image build -t $(IMAGE) .
.PHONY: run
run:
@echo $(APP)
docker run -it --rm -v /tmp/.X11-unix/:/tmp/.X11-unix/:ro \
-v $$(pwd):/root/data \
-e XAUTH=$$(xauth list|grep `uname -n` | cut -d ' ' -f5) -e "DISPLAY" \
$(IMAGE) $(APP)