forked from lihop/dockermail
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
75 lines (53 loc) · 1.83 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
# Build a container via the command "make build"
# By Jason Gegere <[email protected]>
VERSION = 2.1.10
NAME = imap-server
IMAGE_REPO = htmlgraphic
IMAGE_NAME = $(IMAGE_REPO)/$(NAME)
DOMAIN = htmlgraphic.com
all:: help
help:
@echo ""
@echo "-- Help Menu"
@echo ""
@echo " make build - Build image $(IMAGE_NAME):$(VERSION)"
@echo " make push - Push $(IMAGE_NAME):$(VERSION) to public docker repo"
@echo " make run - Run docker-compose and create local development environment"
@echo " make start - Start the EXISTING $(NAME) container"
@echo " make stop - Stop local environment build"
@echo " make restart - Stop and start $(NAME) container"
@echo " make rm - Remove $(NAME) container"
#### MAIL SERVICE
build:
@echo "Building $(IMAGE_NAME):$(VERSION)..."
cd dovecot; docker build -t $(IMAGE_NAME):$(VERSION) .
push:
@echo "note: If the repository is set as an automatted build you will NOT be able to push"
docker push $(IMAGE_NAME):$(VERSION)
run:
@echo "Run $(IMAGE_NAME):$(VERSION)..."
docker-compose -f docker-compose.yml up -d
start:
@echo "Starting $(NAME):$(VERSION)..."
docker start $(NAME)
stop:
@echo "Stopping $(NAME):$(VERSION)..."
docker-compose stop
restart: stop start
rm: stop
@echo "Removing $(NAME):$(VERSION)..."
docker rm $(NAME)
#### BELOW NEEDS TO BE REFINED, SIMPLIFIED AND IMPROVED
rainloop: dovecot
cd rainloop; docker build -t rainloop:1.6.9 .
mailpile: dovecot
cd mailpile; docker build -t mailpile:latest .
owncloud: dovecot
cd owncloud; docker build -t owncloud:7.0.2 .
run-rainloop:
docker run -d -p 127.0.0.1:33100:80 rainloop:1.6.9
run-mailpile:
docker run -d -p 127.0.0.1:33411:33411 mailpile:latest
run-owncloud:
docker run -d -p 127.0.0.1:33200:80 -v /srv/owncloud:/var/www/owncloud/data owncloud:7.0.2
run-all: run run-rainloop run-owncloud