pagekite/Mailpile — pull request #692 by djmaze (2014-05-19 23:27:02+00:00)
Title: Replace docker config and add a configuration for fig

The old Docker setup is outdated and does not work anymore. I made a new one with quite a different approach.

(Prerequisites: You need to install [docker][1] and [fig][2].)

The image is built directly from your checkout of Mailpile. This is the reason the Dockerfile needs to be at the project's root. You can build and run the docker container on your Linux machine like this (from the Mailpile checkout root dir):

sudo docker build -t mailpile .
sudo docker run -d -p 33411:33411 mailpile

To make it easier to develop and use Mailpile, a configuration for [fig][2] was added. This greatly simplies the usage:

sudo fig build
sudo fig up

The fig configuration:
* makes sure that the `.mailpile` directory is persisted and will be used even if you build and run a new container.
* automatically mounts your current working directory into the container. That means every change you make will instantly be available in the docker container. So you can use it for development easily.
* Use `sudo fig run mailpile /Mailpile/mp` to run the Mailpile console or `sudo fig run mailpile bash` to run a shell inside the container.

Those features also make it easier to cleanly install and run new versions of Mailpile on a server. Have a look at [fig's homepage][2] if you want to get the whole picture.

[1]: https://www.docker.io/
[2]: http://orchardup.github.io/fig/