forked from haraka/Haraka
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
48 lines (38 loc) · 1.63 KB
/
Dockerfile
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
# This file describes how to build Haraka into a runnable linux container with all dependencies installed
# To build:
# 1.) Install docker (http://docker.io)
# 2.) Clone Haraka repo if you haven't already: git clone https://github.com/haraka/Haraka.git
# 3.) Modify config/host_list with the domain(s) that you'd like to receive mail to
# 4.) Build: cd Haraka && docker build .
# 5.) Run:
# docker run -d <imageid>
#
# VERSION 0.1
# DOCKER-VERSION 0.5.3
# See http://phusion.github.io/baseimage-docker/
FROM phusion/baseimage:latest
MAINTAINER Justin Plock <[email protected]>
ENV HOME /root
RUN /etc/my_init.d/00_regen_ssh_host_keys.sh
RUN sed 's/main$/main universe/' -i /etc/apt/sources.list
RUN DEBIAN_FRONTEND=noninteractive apt-get -y -q update
RUN DEBIAN_FRONTEND=noninteractive apt-get -y -q install python-software-properties g++ make git curl
RUN curl -sL https://deb.nodesource.com/setup_5.x | setuser root bash -
RUN DEBIAN_FRONTEND=noninteractive apt-get -y -q install nodejs && \
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# Optional, useful for development
# See https://github.com/phusion/baseimage-docker#login_ssh
#RUN rm -f /etc/service/sshd/down
#RUN /usr/sbin/enable_insecure_key
# Install Haraka
RUN npm install -g Haraka
RUN haraka -i /usr/local/haraka
ADD ./config/host_list /usr/local/haraka/config/host_list
ADD ./config/plugins /usr/local/haraka/config/plugins
RUN cd /usr/local/haraka && npm install
# Create haraka runit service
RUN mkdir /etc/service/haraka
ADD haraka.sh /etc/service/haraka/run
EXPOSE 25
# Start the init daemon - runit will launch the Haraka process
CMD ["/sbin/my_init"]