-
Notifications
You must be signed in to change notification settings - Fork 64
/
Makefile
49 lines (40 loc) · 1.06 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
39
40
41
42
43
44
45
46
47
48
49
MAKEFLAGS += -s
MAKEFLAGS += --no-builtin-rules
.SUFFIXES:
define USAGE
make build - build static website
make httpd - serve static website on http://localhost:8080
endef
all:
$(info $(USAGE))
clean:
@git clean -fXd
@docker rmi -f yubico/developers/build
@docker rmi -f yubico/developers/httpd
docker-build:
@docker build \
--build-arg uid=$(shell id -u) \
--build-arg gid=$(shell id -g) \
-t yubico/developers/build \
-f Dockerfile.build .
build: docker-build
@docker run --rm \
-u $(shell id -u):$(shell id -g) \
-v $(shell pwd):/developers \
-e NORELEASES=true \
yubico/developers/build
build_noprojects: docker-build
@docker run --rm \
-u $(shell id -u):$(shell id -g) \
-v $(shell pwd):/developers \
-e NORELEASES=true \
-e NOPROJECTS=true \
yubico/developers/build
docker-httpd:
@docker build -t yubico/developers/httpd -f Dockerfile.httpd .
httpd: docker-httpd
@docker run --rm \
-v $(shell pwd)/htdocs/dist:/var/www/localhost/htdocs \
-p 8080:8080 \
yubico/developers/httpd
.PHONY: all clean docker-build build docker-httpd httpd