FROM node:10-slim 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 && apt clean RUN git clone https://github.com/nodemailer/wildduck-webmail /webmail WORKDIR /webmail RUN git checkout 5c54625a8b192823184ba7f5da41f3414e76db94 COPY ./config /webmail/config COPY ./views /webmail/views RUN chown node.node -R /webmail USER node ARG DOMAIN RUN npm i RUN npm run bowerdeps RUN find /webmail/config /webmail/views -type f -exec sed -i "s/{{DOMAIN}}/$DOMAIN/g" {} +