5 ms·
How do people actually use Docker? In my world of bootstrapped, smaller apps looking for market traction, even if things go well, a few Linodes should be enoug
by davidw 12y ago
How do people actually use Docker?
In my world of bootstrapped, smaller apps looking for market traction, even if things go well, a few Linodes should be enough to handle most of the traffic I'll ever need to deal with, so this kind of thing is kind of foreign to me. I'm curious how people utilize it in practice.
- golubbe 12y agoFor a good set of use cases, see https://docker.com/resources/usecases/ https://docker.com/resources/usecases/
- davidw 12y agoTruth be told, to me those are not very meaningful, as those companies operate on a scale, and have requirements that are on another planet from mine. Is Docker useful for people/organizations that are not so large? The other responses seem to think so!
- ossreality 12y agoI guarantee it'd be useful. I guarantee in trying to use it you would find friction in both your day to day dev and deployment cycles. Using docker forces you to write better services that are easier to dev and deploy. And yes, that counts for small projects too. I use docker for my 3 microservice service that runs a single instance on my local box. Still worth it.
- char_pointer 12y agoIt changes your deployment "atom" so instead of deploying compressed artefacts, you deploy containers. This has some advantages in itself (eg. it makes it easier to do gradual upgrades of your full stack, and you can run containers side by side on the same host), but is especially nice in combination with Mesos and Marathon which enables you to scale out horizontally across your cluster.
- csirac2 12y agoI (or rather, jenkins) builds all my software in it, I don't actually use it for containerizing final applications. In a nutshell, for me the value is in trivial repeatability. I can reproduce the entire build toolchain, test environment and produce artifacts all from a few KiB git repo which centres around the Dockerfile and submodules to dependencies. Some of my ARM stuff takes hours to cross-compile and involves enormous amounts of fiddly babysitting normally. Dockerfiles have RUN statements (think lines a shell script) which are cached. My adjustments toward the end of a Dockerfile take only seconds to test and produces the exact same result as if it had really run each statement from the start, which doesn't sound like much but turns out (for me) to be pretty liberating compared to constantly trying to fight other automation where you have to dance around short-circuiting stuff to re-use bits of a past build to save time and get only a handful of "pristine" iterations in a day (that might differ to the iterations you rolled by hand).
- voltagex_ 12y agoI'd be super interested if you could share any of your ARM cross-compilation Dockerfiles.
- csirac2 12y agoThey've got a lot of idiosyncrasies at the moment, some of it working around the fact ADD some/directory/ could never be cached (so my build scripts maintain some.directory.tar.gz and those are ADDed instead), but I really should. I guess I'd put it under my github profile (I'm also csirac2 there). There's two types of ARM builds, ones which can cross-compile and those that can't. The ones which can't cross-compile are done with qemu-binfmts and we chroot into an ARM filesystem and run the build there. Perhaps the only useful contribution would be the fact that I persist the ccache up to the docker host with a shared ccache volume, and that helps enormously especially for the qemu-binfmts builds which can be quite slow.
- voltagex_ 12y agoWhere does your original (non-qemu) toolchain come from? Is that built inside or outside of a container?
- xienze 12y agoBringing up a properly configured VM that stays up to date is actually a lot of work, and the more software you pile directly on top of that VM, the harder it is. For me, my VMs are actually dead simple and relatively homogeneous. Fresh install + lock down SSH + lock down iptables + install Git + install Docker. Then I build from the correct Dockerfile and open whichever port(s) on the VM. Bang, instant node that does [whatever]. Time to upgrade the DB/mail server/app? Build from the new Dockerfile, stop the existing container, bring up the new one. No worrying about installing/uninstalling the correct dependencies on the VM and getting into an inconsistent state. That's what Docker does for you.
- evol262 12y agoThat's also what any sane configuration management system does for you. Don't get me wrong, I think docker is great, but this whole "I get simple idempotent machines" is a solved problem. Docker excels at bundling applications with all their dependencies as an modern analogue to statically linking, or a Linux equivalent to OSX's .app
- zimbatm 12y agoOne big difference is that if you don't declare a resource it doesn't exist anymore. With chef, puppet and friends there's a big gray area of things that are one the machine but not managed by the tool. In practice there are always things lingering on old machines that are not described by the SCM.
- xienze 12y agoSolved by what, Puppet and the like? It's simply too easy to get your machine into an inconsistent state as a result of someone fiddling around, and God forbid you switch from Ubuntu to CentOS or something like that. I find it's easier to make the OS part as simple as possible and use Docker for everything else since you can strictly enforce that your Dockerfile will always build the same way regardless of which OS you build it on.
- saryant 12y ago
- hunvreus 12y agoOut of curiosity, how do you manage your servers? Chef, Puppet, Salt Stack? Simple shell scripts? Why not using something like Heroku if you want the flexibility of scaling only when needed?
- davidw 12y agoI mostly manage them with emacs and dpkg/apt. You can build quite a lot of stuff on one Linode if you're charging money for it.
- king_magic 12y agoSelf-hosted PaaS platforms like Dokku, Flynn, Deis, etc give you Heroku-like deployment & management without the cost of something like Heroku. All three of these are built on Docker. I've been running Dokku on DigitalOcean lately and it has been great (though I'm planning on eventually moving to Deis, now that DigitalOcean supports CoreOS). https://github.com/progrium/dokku https://github.com/progrium/dokku https://flynn.io https://flynn.io http://deis.io http://deis.io
- ishbits 12y agoRight now I use it for demos... We use a stack that is little complex for someone wanting a quick taste. So provided they have a modern Linux with with docker installed they can quickly do a self demo. And if they don't, well having a fresh image that is easily rebuildable makes it easier for me to give demos than to spin fresh VMs. Arguably I could have done the same with Vagrant, but really didn't need the overhead of the VM. But for using it in deployment, no.
- nickstinemates 12y agoThis is really cool to hear. If you're interested in having us know more about your project, I'd be more than happy to take the time. Information is in my profile.