-
Notifications
You must be signed in to change notification settings - Fork 366
/
Makefile
101 lines (79 loc) · 2.78 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
TAG := $(GITHUB_REF)
ifeq ($(TAG),)
TAG := $(shell git symbolic-ref --short -q HEAD)
endif
ifeq ($(TAG),)
TAG := $(shell git rev-parse --short --verify HEAD)
endif
define docker_build_and_push
docker buildx build \
--push \
--platform linux/arm64,linux/amd64 \
-t "schickling/$1:$(if $2,$2,$(TAG))" \
./$1
endef
help:
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n\nTargets:\n"} /^[0-9a-zA-Z_-]+:.*?##/ { printf " \033[36m%-18s\033[0m %s\n", $$1, $$2 }' $(MAKEFILE_LIST)
@echo $(TAG)
all: beanstalkd beanstalkd-console hugin jekyll latex mailcatcher mysql-backup-s3 nginx-envtpl nodejs octave opencv postgres-backup-s3 postgres-restore-s3 redis-commander rust s3cmd scala-sbt-docker swagger-ui thumbor-nginx-cors ## Build all images
.PHONY: beanstalkd
beanstalkd: ## Build beanstalkd image
$(call docker_build_and_push,beanstalkd)
.PHONY: beanstalkd-console
beanstalkd-console: ## Build beanstalkd-console image
$(call docker_build_and_push,beanstalkd-console)
.PHONY: hugin
hugin: ## Build hugin image
$(call docker_build_and_push,hugin)
.PHONY: jekyll # (This image is not compatible with arm architecture)
jekyll: ## Build jekyll image
docker buildx build \
--push \
--platform linux/amd64 \
-t "schickling/$1" \
./$1
.PHONY: latex
latex: ## Build latex image
$(call docker_build_and_push,latex)
.PHONY: mailcatcher
mailcatcher: ## Build mailcatcher image
$(call docker_build_and_push,mailcatcher)
.PHONY: mysql-backup-s3
mysql-backup-s3: ## Build mysql-backup-s3 image
$(call docker_build_and_push,mysql-backup-s3)
.PHONY: nginx-envtpl
nginx-envtpl: ## Build nginx-envtpl image
$(call docker_build_and_push,nginx-envtpl)
.PHONY: nodejs
nodejs: ## Build nodejs image
$(call docker_build_and_push,nodejs)
.PHONY: octave
octave: ## Build octave image
$(call docker_build_and_push,octave)
.PHONY: opencv
opencv: ## Build opencv image
$(call docker_build_and_push,opencv)
.PHONY: postgres-backup-s3
postgres-backup-s3: ## Build postgres-backup-s3 image
$(call docker_build_and_push,postgres-backup-s3)
.PHONY: postgres-restore-s3
postgres-restore-s3: ## Build postgres-restore-s3 image
$(call docker_build_and_push,postgres-restore-s3)
.PHONY: redis-commander
redis-commander: ## Build redis-commander image
$(call docker_build_and_push,redis-commander)
.PHONY: rust
rust: ## Build rust image
$(call docker_build_and_push,rust)
.PHONY: s3cmd
s3cmd: ## Build s3cmd image
$(call docker_build_and_push,s3cmd)
.PHONY: scala-sbt-docker
scala-sbt-docker: ## Build scala-sbt-docker image
$(call docker_build_and_push,scala-sbt-docker)
.PHONY: swagger-ui
swagger-ui: ## Build swagger-ui image
$(call docker_build_and_push,swagger-ui)
.PHONY: thumbor-nginx-cors
thumbor-nginx-cors: ## Build thumbor-nginx-cors image
$(call docker_build_and_push,thumbor-nginx-cors)