forked from mailpile/Mailpile
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
35 lines (26 loc) · 808 Bytes
/
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
FROM ubuntu:16.10
# Install dependencies
RUN apt-get update -y && \
apt-get install -y openssl python-imaging python-jinja2 python-lxml libxml2-dev libxslt1-dev python-pgpdump spambayes tor
# Add code
WORKDIR /Mailpile
ADD . /Mailpile
# Create users and groups
RUN groupadd -r mailpile \
&& mkdir -p /mailpile-data/.gnupg \
&& useradd -r -d /mailpile-data -g mailpile mailpile
# Add GnuPG placeholder file
RUN touch /mailpile-data/.gnupg/docker_placeholder
# Fix permissions
RUN chown -R mailpile:mailpile /Mailpile
RUN chown -R mailpile:mailpile /mailpile-data
# Run as non-privileged user
USER mailpile
# Initialize mailpile
RUN ./mp setup
# Entrypoint
CMD ./mp --www=0.0.0.0:33411 --wait
EXPOSE 33411
# Volumes
VOLUME /mailpile-data/.local/share/Mailpile
VOLUME /mailpile-data/.gnupg