3 ms·
> You know, Unix has a pretty good abstraction already for managing resources: a process. And that's what Docker is built on: processes + namespaces to restric
by vidarh 12y ago
> You know, Unix has a pretty good abstraction already for managing resources: a process.
And that's what Docker is built on: processes + namespaces to restrict what each process group can access.
> I look at things like Docker and think, you are solving a completely artificial problem, and as soon as fashion swings the other way (10 years at most) people will wonder why people ever did this.
Things like Docker will still have value with single-executable containers. Problems that people have had for years. Even with single-executables.
You still need to manage privileges. You still need service discovery. You still need to manage the network. You still need to manage data volumes. You still need to manage the environment.
Docker provides mechanisms that either solves all of that, or provides information for tools to hook into (e.g. ability to query what ports the currently running containers expose).
I agree with you that there is distinct benefit in self-contained executables, and I think you'll find a lot of people working with Docker thinks the same. Partly this is part of what Docker gives us: We get to treat a bigger hairball of an environment pretty much like a single entity, even if we're not able to slim it down.
But partly, note that a lot of the adoption of Go within devops tools appears to at least partially be motivated by the simplicity of distribution and installation from getting static binaries (without having to use C). I prefer Ruby, and find Go to be a ugly, too low level, language, but I definitively understand the appeal Go has when it comes to simplicity.
Yet despite having those devops tools as single executables, people want to put them in containers to manage them properly.
If anything, I hope and think that things will move even further down this route. For my part, I'm containerising my desktop environment part by part. There's no reason we should not move to far more locked down process environments.
- custardcream 12y agoCouple 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.