-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMakefile.local
More file actions
32 lines (27 loc) · 838 Bytes
/
Makefile.local
File metadata and controls
32 lines (27 loc) · 838 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
# check for any binary required by the Makefile to function in the local environment
HAS_GIT := $(shell command -v git;)
HAS_DOCKER := $(shell command -v docker;)
ifndef HAS_GIT
$(error "You must install Git")
endif
ifndef HAS_DOCKER
$(error "You must install Docker v1.10+")
endif
## prefix before other make targets to run in your local dev environment
local: | quiet
@$(eval DOCKERRUN= )
@$(eval DOCKERNOVENDOR= )
@mkdir -p tmp
@date > tmp/dev_image_id
quiet: # this is silly but shuts up 'Nothing to be done for `local`'
@:
# ------ Docker Helpers
.PHONY: drma
drma:
@docker rm $(shell docker ps -a -q) 2>/dev/null || :
.PHONY: drmia
drmia:
@docker rmi $(shell docker images -q --filter "dangling=true") 2>/dev/null || :
.PHONY: drmvu
drmvu:
@docker volume rm $(shell docker volume ls -qf dangling=true) 2>/dev/null || :