Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update : Dockerfile #962

Closed
wants to merge 2 commits into from
Closed

update : Dockerfile #962

wants to merge 2 commits into from

Conversation

almereyda
Copy link

Hi @brennannovak,

the Dockerfile and the instructions in the wiki didn't work for me, so I refactored it based on the vagrant-bootstrap.sh.

I would also propose to run it as a deamon and add this info to the respective wiki page afterwards.

docker run -d -p 33411:33411 mailpile

Despite the changes look trivial, it took around 45mins time to figure it out, if you are tracking these kind of contributions.

@almereyda
Copy link
Author

The Travis error is not due to the Dockerfile.

The original problem where it all started was

Step 8 : RUN ./mp --setup
 ---> Running in 4ed14e6d22dc
Creating: /.local/share/Mailpile/default                                       
Failed to configure i18n. Using fallback.                                      
option --setup requires argument                                               
2014/09/18 13:19:28 The command [/bin/sh -c ./mp --setup] returned a non-zero code: 1

@almereyda
Copy link
Author

Thanks to @DoubleMalt I also did some work on seperating data and application with regards to the 12factor model.

Feel free to fork from or refer to

It's also on the docker hub and could theoretically be run by

  • docker run -d -name="mailpile_data" almereyda/docker-mailpile-data alongside
  • git clone https://github.com/almereyda/Mailpile && docker build -t mailpile:app Mailpile && docker run --name="mailpile_application" --volumes-from="mailpile_data" -d -p 127.0.0.1:33411:33411 mailpile:app

@BjarniRunar Together with Docker's unclear behaviour with data volumes I wasn't sure if the separation actually worked. But it seems the combination of the Dockerfile and the data volume leaves the choice to the user/provider where to keep Mailpiles data, if neccessary. At least it seems to be a starting point for enabling easy mailpile upgrades while personal data is retained. Another approach can be found below.

I can only suggest to create an official pagekite/Mailpile trusted Docker build now, so effort isn't spent by doubling preceeding work, instead by merging them:

  • archifleks/mailpile trusted build
  • with systemd service file and the --volume approach to dissect the private data into the local filesystem. Which even points towards user-seperated Mailpile instances on any to-be-mapped-inside-the-container-Maildir providing hosts, i.e. shared hosting postfix servers et al. . ...

Due to the unclear response I got in the Mail sources dialogue, as mentionned in the link above, it took me another ~3 hrs to believe the seperation worked. I'd actually like to know if that is the case, why I'm asking for prove before the PR should be merged.

@almereyda
Copy link
Author

Well, there's more going on today that wants to be merged : #966 : so @kentonv can be happy again #923 (comment).

@stephenliang Any ideas how to consolidate our Pull Requests? They seem to take separate approaches, esp. regarding mp setup and the storage folder. A focused documentation upgrade seems rather useful, too.

@almereyda
Copy link
Author

Another problem with the Docker container I came across today is, slightly OT, that /etc/resolv.conf contains the DHCP'ed nameserver from the network where it has been set up. Networking, i.e. the forwarding through the Docker host is transparent, but the nameserver configuration is not updated inside the container if the external networks change.

@stephenliang
Copy link
Contributor

I think the setup and the new storage folder location is necessary due to the new structure. I've been running MP on a docker instance for 5 days now and it's working fine

@almereyda
Copy link
Author

Which is the new structure?
What exactly does mp setup?
And why is it working with my variant, too?

@stephenliang
Copy link
Contributor

Please see the manual configuration wiki

@BjarniRunar
Copy link
Member

I have been away for ages and am just catching up now - I'd very sorry this has been ignored so long, you put lots of effort into it. Unfortunately, as I know nothing abut Docker, I can't really evaluate this. I could blindly merge, but I'd rather get input from @DoubleMalt first, as I know they are relying on Docker for their work.

@DoubleMalt
Copy link
Contributor

Putting /root/.gnupg in a volume would make sense for the current Dockerfile. However this pull request has a completely different base than the current Dockerfile.

I will add the Volume line to the Dockerfile and create a Pull request

@BjarniRunar
Copy link
Member

This is now very old and there was a bunch of back-and-forth - I am confused about the state of things, and I am going to close this. However, I encourage you guys to submit a new PR based on whatever the current state of the art is. :-)

Also, since I know it relates to making multi-user installs easier, which seems like a main docker use-case, I want to draw attention to the features/metadata.ng branch, where I am reworking the underlying storage systems to use less RAM and start up more quickly.

@almereyda
Copy link
Author

Dear @BjarniRunar , thanks for your kind and informative comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants