3 ms·
Couple of points/questions, at least from my perspective as a man of many hats to anyone passing by the above comment: 1. Docker appears to only allow a single
by custardcream 12y ago
Couple of points/questions, at least from my perspective as a man of many hats to anyone passing by the above comment:
1. Docker appears to only allow a single entry point per container. What do I do if I want to run a container consisting of say postfix and dovecot together? If this is possible can someone please point me at it.
2. Go doesn't allow you to bundle resources with the executables (as say Java/C#) so you have to rely on 3rd party libraries to do this that aren't very good. I can't easily ship my templates with my web server for example as part of the "go build" process. Again if I'm wrong, please point me at a solution.
- vidarh 12y agoPersonally I wouldn't run Postfix and Dovecot together under Docker. Instead, I'd export a volume for the mail store, and share that volume between a Postfix and Dovecot container. But if you absolutely want to put them in the same container, the solution is to run a process manager as the entrypoint. E.g. base it on something like baseimage-docker [1] Re: 2. I don't use Go, so I can't answer that part. [1] http://phusion.github.io/baseimage-docker/ http://phusion.github.io/baseimage-docker/
- custardcream 12y agoThanks for the info. I'd have a couple of problems with exporting the volume because I need postfix to talk to a Unix domain socket that dovecot listens on for SASL auth. I'll go with the process manager solution - thanks for your suggestion! Been trying to build a canned mail server for a few years so this is probably a nice solution if I can get my head around it.
- myhf 12y agoUnix domain sockets work in docker shared volumes. A common use-case is to mount /dev/log into a container so that it doesn't have to run its own syslogd.
- vidarh 12y agoHot tip for saving time: Always search for "docker [what you want to run]" (not just via docker, but a search engine). Even if what you find isn't a perfect match, there's a vast number of Dockerfiles on Github and elsewhere that'll give you decent starting points.