|
|
@ -1,7 +1,8 @@ |
|
|
|
FROM node:10-slim |
|
|
|
ARG DOMAIN |
|
|
|
ARG REVERSE_DNS |
|
|
|
RUN apt update && apt -y install git python make g++ libcap2-bin |
|
|
|
LABEL version=1.0.0 |
|
|
|
LABEL description="Haraka-Wildduck Docker Mail Server" |
|
|
|
LABEL maintainer="ale@hatthieves.es" |
|
|
|
RUN apt update && apt -y install git python make g++ libcap2-bin && apt clean |
|
|
|
RUN git clone https://github.com/nodemailer/wildduck /wildduck |
|
|
|
RUN git clone https://github.com/zone-eu/zone-mta-template /wildduck-mta |
|
|
|
RUN git clone https://github.com/haraka/Haraka /haraka |
|
|
@ -11,14 +12,13 @@ COPY ./wildduck-mta/config /wildduck-mta/config |
|
|
|
RUN chown node.node -R /wildduck /wildduck-mta /haraka |
|
|
|
RUN setcap 'cap_net_bind_service=+ep' /usr/local/bin/node |
|
|
|
USER node |
|
|
|
ENV DOMAIN=$DOMAIN REVERSE_DNS=$REVERSE_DNS |
|
|
|
WORKDIR /wildduck |
|
|
|
RUN npm install --production |
|
|
|
RUN npm i --production |
|
|
|
WORKDIR /wildduck-mta |
|
|
|
RUN npm install --production |
|
|
|
RUN npm install zonemta-wildduck -S |
|
|
|
RUN npm install zonemta-limiter -S |
|
|
|
RUN npm i --production |
|
|
|
RUN npm i -S zonemta-wildduck |
|
|
|
RUN npm i -S zonemta-limiter |
|
|
|
WORKDIR /haraka |
|
|
|
RUN npm install |
|
|
|
RUN npm install haraka-plugin-wildduck -S |
|
|
|
RUN find ../haraka/config ../wildduck/config ../wildduck-mta/config -type f -exec sed -i "s/{{DOMAIN}}/$DOMAIN/g" {} + |
|
|
|
RUN find ../haraka/config ../wildduck/config ../wildduck-mta/config -type f -exec sed -i "s/{{REVERSE_DNS}}/$REVERSE_DNS/g" {} + |
|
|
|
RUN npm i |
|
|
|
RUN npm i -S haraka-plugin-wildduck -S |