FROM node:8-slim
RUN apt update && apt -y install git python make sudo
RUN git clone https://github.com/nodemailer/wildduck-webmail /webmail
RUN chown node.node -R /webmail
WORKDIR /webmail
RUN git checkout 5c54625a8b192823184ba7f5da41f3414e76db94
RUN sudo -u node npm install
RUN sudo -u node npm run bowerdeps
