-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
26 lines (22 loc) · 697 Bytes
/
Copy pathMakefile
File metadata and controls
26 lines (22 loc) · 697 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
base:
docker build -t asyazwan/vim .
plugins:
sh -c 'docker build -f Dockerfile.plugins -t asyazwan/vim:syazwan \
--squash \
--build-arg USERNAME=$(shell id -un) \
--build-arg GROUPNAME=$(shell id -gn) \
--build-arg UID=$(shell id -u) \
--build-arg GID=$(shell id -g) \
--build-arg WORKSPACE=$$HOME \
--build-arg SHELL=/usr/bin/fish .'
ifeq (run,$(firstword $(MAKECMDGOALS)))
# use the rest as arguments for "run"
DIR := $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS))
# ...and turn them into do-nothing targets
$(eval $(DIR):;@:)
endif
run:
docker run --rm -it \
--hostname vim \
-v "$(word 2,$(MAKECMDGOALS))":$$HOME/dev/ asyazwan/vim:syazwan
.PHONY: run