-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
44 lines (37 loc) · 1.03 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
.DEFAULT_GOAL := help
.PHONY : help
CYAN := "\e[0;36m"
NC := "\e[0m"
INFO := @bash -c 'printf $(CYAN); echo "$$1"; printf $(NC)' MESSAGE
# Remove annoying Docker advertise
DOCKER_SCAN_SUGGEST=false
# Help
help:
@echo "Usage: make <target>"
@echo ""
@echo "Available targets:"
@sed -n 's/^## HELP://p' Makefile
build:
${INFO} "🚀 Building container..."
DOCKER_CONTEXT=default docker build . -t stackhero-heroku-examples
${INFO} "✅ Successfully build container!"
## HELP: run : Run Docker container (Heroku oAuth)
run: build
DOCKER_CONTEXT=default docker run \
-it \
-h stackhero-heroku-examples \
-v $(PWD):/stackhero \
stackhero-heroku-examples
## HELP: run-password : Run Docker container (Heroku password)
run-password: build
@DOCKER_CONTEXT=default \
docker rm -f stackhero-heroku-examples || true
DOCKER_CONTEXT=default \
docker run \
-it \
--rm \
--name=stackhero-heroku-examples \
-h stackhero-heroku-examples \
-v $(PWD):/stackhero \
-e HEROKU_INTERACTIVE=true \
stackhero-heroku-examples