-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
35 lines (28 loc) · 1.14 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
default: build_all
dispatcher:
docker build -t nginx-haconiwa ./nginx
docker run --rm -v $(PWD)/nginx/builds:/builds -t nginx-haconiwa
mv ./nginx/builds/nginx* ./provision/dist/
base:
docker build -t haconiwa-container:base ./containers/base
nginx:
docker build -t haconiwa-container:nginx ./containers/nginx
docker run -d -h nginx --rm --name haconiwa-nginx -t haconiwa-container:nginx
docker export haconiwa-nginx > ./provision/dist/nginx.image.tar
docker stop haconiwa-nginx
docker rmi haconiwa-container:nginx
ssh:
docker build -t haconiwa-container:ssh ./containers/ssh
docker run -d -h ssh --rm --name haconiwa-ssh -t haconiwa-container:ssh
docker export haconiwa-ssh > ./provision/dist/ssh.image.tar
docker stop haconiwa-ssh
docker rmi haconiwa-container:ssh
postfix:
docker build -t haconiwa-container:postfix ./containers/postfix
docker run -d -h postfix --rm --name haconiwa-postfix -t haconiwa-container:postfix
docker export haconiwa-postfix > ./provision/dist/postfix.image.tar
docker stop haconiwa-postfix
docker rmi haconiwa-container:postfix
build: base nginx ssh postfix
build_all: dispatcher build
.PHONY: dispatcher nginx