forked from webdevops/Dockerfile
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
161 lines (116 loc) · 5.05 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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
ARGS = $(filter-out $@,$(MAKECMDGOALS))
MAKEFLAGS += --silent
.PHONY: test documentation baselayout provision
DOCKER_REPOSITORY=`cat DOCKER_REPOSITORY`
DOCKER_TAG_LATEST=`cat DOCKER_TAG_LATEST`
list:
sh -c "echo; $(MAKE) -p no_targets__ | awk -F':' '/^[a-zA-Z0-9][^\$$#\\t=]*:([^=]|$$)/ {split(\$$1,A,/ /);for(i in A)print A[i]}' | grep -v '__\$$' | grep -v 'Makefile'| sort"
full: provision build
all: build
build: bootstrap base web php php-dev hhvm service misc applications
bootstrap: webdevops/bootstrap webdevops/ansible
base: webdevops/base webdevops/base-app webdevops/storage
service: webdevops/ssh webdevops/vsftp webdevops/postfix
php: webdevops/php webdevops/php-apache webdevops/php-nginx
php-dev: webdevops/php-dev webdevops/php-apache-dev webdevops/php-nginx-dev
hhvm: webdevops/hhvm webdevops/hhvm-apache webdevops/hhvm-nginx
web: webdevops/apache webdevops/apache-dev webdevops/nginx webdevops/nginx-dev webdevops/varnish
applications: webdevops/typo3 webdevops/piwik
misc: webdevops/mail-sandbox webdevops/sphinx
test:
cd "test/" && make all
test-hub-images:
DOCKER_PULL=1 make test
baselayout:
BASELAYOUT=1 PROVISION=0 bash bin/provision.sh
provision:
python bin/buildDockerfile.py --template=template/ --dockerfile=docker/
BASELAYOUT=0 PROVISION=1 bash bin/provision.sh
publish: dist-update rebuild test push
dist-update:
docker pull centos:7
docker pull ubuntu:12.04
docker pull ubuntu:14.04
docker pull ubuntu:15.04
docker pull ubuntu:15.10
docker pull ubuntu:16.04
docker pull debian:7
docker pull debian:8
docker pull debian:stretch
docker pull alpine:3.3
rebuild:
# Rebuild all containers but use caching for duplicates
# Bootstrap
FORCE=1 make webdevops/bootstrap
FORCE=0 make webdevops/ansible
# Base
FORCE=1 make webdevops/base
FORCE=1 make webdevops/base-app
FORCE=0 make webdevops/storage
# Other containers
FORCE=1 make web
FORCE=1 make php
FORCE=1 make hhvm
FORCE=1 make service
FORCE=1 make misc
FORCE=1 make applications
push:
BUILD_MODE=push make all
graph:
python ./bin/diagram.py --dockerfile docker/ --filename documentation/docs/resources/images/docker-image-layout.gv
documentation:
docker run -t -i --rm -p 8080:8000 -v "$$(pwd)/documentation/docs/:/opt/docs" webdevops/sphinx sphinx-autobuild --poll -H 0.0.0.0 /opt/docs html
webdevops/bootstrap:
bash bin/build.sh bootstrap "${DOCKER_REPOSITORY}/bootstrap" "${DOCKER_TAG_LATEST}"
webdevops/ansible:
bash bin/build.sh bootstrap "${DOCKER_REPOSITORY}/ansible" "${DOCKER_TAG_LATEST}"
webdevops/base:
bash bin/build.sh base "${DOCKER_REPOSITORY}/base" "${DOCKER_TAG_LATEST}"
webdevops/base-app:
bash bin/build.sh base-app "${DOCKER_REPOSITORY}/base-app" "${DOCKER_TAG_LATEST}"
webdevops/php:
bash bin/build.sh php "${DOCKER_REPOSITORY}/php" "${DOCKER_TAG_LATEST}"
webdevops/php-dev:
bash bin/build.sh php-dev "${DOCKER_REPOSITORY}/php-dev" "${DOCKER_TAG_LATEST}"
webdevops/apache:
bash bin/build.sh apache "${DOCKER_REPOSITORY}/apache" "${DOCKER_TAG_LATEST}"
webdevops/apache-dev:
bash bin/build.sh apache-dev "${DOCKER_REPOSITORY}/apache-dev" "${DOCKER_TAG_LATEST}"
webdevops/nginx:
bash bin/build.sh nginx "${DOCKER_REPOSITORY}/nginx" "${DOCKER_TAG_LATEST}"
webdevops/nginx-dev:
bash bin/build.sh nginx-dev "${DOCKER_REPOSITORY}/nginx-dev" "${DOCKER_TAG_LATEST}"
webdevops/php-apache:
bash bin/build.sh php-apache "${DOCKER_REPOSITORY}/php-apache" "${DOCKER_TAG_LATEST}"
webdevops/php-apache-dev:
bash bin/build.sh php-apache-dev "${DOCKER_REPOSITORY}/php-apache-dev" "${DOCKER_TAG_LATEST}"
webdevops/php-nginx:
bash bin/build.sh php-nginx "${DOCKER_REPOSITORY}/php-nginx" "${DOCKER_TAG_LATEST}"
webdevops/php-nginx-dev:
bash bin/build.sh php-nginx-dev "${DOCKER_REPOSITORY}/php-nginx-dev" "${DOCKER_TAG_LATEST}"
webdevops/hhvm:
bash bin/build.sh hhvm "${DOCKER_REPOSITORY}/hhvm" "${DOCKER_TAG_LATEST}"
webdevops/hhvm-apache:
bash bin/build.sh hhvm-apache "${DOCKER_REPOSITORY}/hhvm-apache" "${DOCKER_TAG_LATEST}"
webdevops/hhvm-nginx:
bash bin/build.sh hhvm-nginx "${DOCKER_REPOSITORY}/hhvm-nginx" "${DOCKER_TAG_LATEST}"
webdevops/ssh:
bash bin/build.sh ssh "${DOCKER_REPOSITORY}/ssh" "${DOCKER_TAG_LATEST}"
webdevops/storage:
bash bin/build.sh storage "${DOCKER_REPOSITORY}/storage" "${DOCKER_TAG_LATEST}"
webdevops/vsftp:
bash bin/build.sh vsftp "${DOCKER_REPOSITORY}/vsftp" "${DOCKER_TAG_LATEST}"
webdevops/postfix:
bash bin/build.sh postfix "${DOCKER_REPOSITORY}/postfix" "${DOCKER_TAG_LATEST}"
webdevops/mail-sandbox:
bash bin/build.sh mail-sandbox "${DOCKER_REPOSITORY}/mail-sandbox" "${DOCKER_TAG_LATEST}"
webdevops/typo3:
bash bin/build.sh typo3 "${DOCKER_REPOSITORY}/typo3" "${DOCKER_TAG_LATEST}"
webdevops/piwik:
bash bin/build.sh piwik "${DOCKER_REPOSITORY}/piwik" "${DOCKER_TAG_LATEST}"
webdevops/samson-deployment:
bash bin/build.sh samson-deployment "${DOCKER_REPOSITORY}/samson-deployment" "${DOCKER_TAG_LATEST}"
webdevops/sphinx:
bash bin/build.sh sphinx "${DOCKER_REPOSITORY}/sphinx" "${DOCKER_TAG_LATEST}"
webdevops/varnish:
bash bin/build.sh varnish "${DOCKER_REPOSITORY}/varnish" "${DOCKER_TAG_LATEST}"