-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
37 lines (29 loc) · 997 Bytes
/
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
GIT_REPO=github.com/amukherj/envoys2s
CONTAINER_IMGS=rockers-img moods-img frontsvc-img edgesvc-img
all: bin/randlst bin/frontsvc $(CONTAINER_IMGS)
.PHONY: clean
clean:
rm -rf bin/*
docker rmi rockers-img:latest frontsvc-img:latest edgesvc-img:latest
bin/randlst:
mkdir -p `dirname $@`
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o $@ $(GIT_REPO)/cmd/service
bin/frontsvc:
mkdir -p `dirname $@`
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o $@ $(GIT_REPO)/cmd/`basename $@`
.PHONY: rockers-img
rockers-img: bin/randlst
-docker rmi $@:latest >/dev/null 2>&1
docker build -t $@:latest -f Dockerfile-rockers .
.PHONY: moods-img
moods-img:
-docker rmi $@:latest >/dev/null 2>&1
docker build -t $@:latest -f Dockerfile-moods .
.PHONY: frontsvc-img
frontsvc-img:
-docker rmi $@:latest >/dev/null 2>&1
docker build -t $@:latest -f Dockerfile-frontsvc .
.PHONY: edgesvc-img
edgesvc-img:
-docker rmi $@:latest >/dev/null 2>&1
docker build -t $@:latest -f Dockerfile-edgesvc .