-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
30 lines (22 loc) · 818 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
image: ## docker build the image
docker build -t lakr/demo_sleeper:0.2 .
run: ## docker run the demo
docker run lakr/demo_sleeper:0.2
docker: image run
local: ## Run the demo on the host system
./demo_sleeper.rb
scale: ## Run 5 instances
docker-compose up --remove-orphans --scale=demo=5
all: image run scale local
# Yes, I think all code should be linted
lint: ## Run standardrb on Ruby, hadolint on Dockerfile
standardrb demo_sleeper.rb
docker run --rm -i hadolint/hadolint < Dockerfile
make -n all
# could even do
# $ make -n all lint
# to lint the lint step
help: ## Display this output.
@egrep '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'
.PHONY: clean help lint all scale local docker run image
.DEFAULT_GOAL := help