-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
71 lines (51 loc) · 966 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
SHELL := /bin/bash
ifndef REPO
REPO :=
endif
ifndef SERVICE
SERVICE :=
endif
ifneq "$(TAG)" ""
REPO_TAG := "$(REPO):$(TAG)"
else
REPO_TAG := "$(REPO)"
endif
.PHONY: build
build:
docker build --no-cache -t $(REPO_TAG) .
.PHONY: buildall
buildall:
./buildall
.PHONY: push
push:
docker push $(REPO_TAG)
.PHONY: pushall
pushall:
./pushall
.PHONY: build-pushall
build-pushall:
./build-pushall
.PHONY: rmi
rmi:
docker rmi $(REPO_TAG)
.PHONY: run
run:
docker-compose run --rm --service-ports $(SERVICE)
.PHONY: rund
rund:
docker-compose run --rm --service-ports -d $(SERVICE)
# dev commands
# DEVCOMMAND=docker-compose -f docker-compose.dev.yml
# DEVCOMMAND_RUN=$(DEVCOMMAND) run --rm --service-ports
# dev-server:
# $(DEVCOMMAND_RUN) server
# dev-server-conf:
# $(DEVCOMMAND_RUN) server-conf
# dev-build:
# $(DEVCOMMAND) build
# interactive:
# $(DEVCOMMAND_RUN) interactive
# ps:
# $(DEVCOMMAND) ps
# dev-build:
# $(DEVCOMMAND) build