-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Commented Dockerfile, added .dockerignore
- Loading branch information
Showing
2 changed files
with
14 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Dockerfile | ||
Vagrantfile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,35 @@ | ||
FROM ubuntu:14.04 | ||
|
||
# Install dependencies | ||
RUN apt-get update -y | ||
RUN apt-get install -y openssl python-imaging python-jinja2 python-lxml libxml2-dev libxslt1-dev python-pgpdump | ||
|
||
# Add code | ||
WORKDIR /Mailpile | ||
ADD . /Mailpile | ||
|
||
RUN groupadd -r mailpile \ | ||
&& mkdir -p /mailpile-data/.gnupg \ | ||
&& useradd -r -d /mailpile-data -g mailpile 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 |