4 ms·
It's all about simplifying deployment. That's it, that's what's so good about using containers. I don't know if you understand what Docker really is when you s
by piva00 10y ago
It's all about simplifying deployment. That's it, that's what's so good about using containers.
I don't know if you understand what Docker really is when you say something like this: "Run only one process in one brand new kernel", the kernel is shared between containers, that's the whole idea, you package the things your application need and be done with it.
The current problem with containerization is that there are no really good or understood best practices, people are still experimenting and that's why it's a big moving target and, consequently, a pain in the ass if you need to support a more enterprise-y environment. You will need to be able to change and re-architecture things if the state-of-the-art changes tomorrow.
I agree with your sentiment about going overboard on "docker all the things", that's dumb and some people do it more because of the hype than by understanding their needs and using a good solution for it but I think you are criticising something you don't really grasp, these two statements:
> "Run only one process in one brand new kernel"
> you have a kernel in your hand, why the hell you will run only one process on it?
I'm not trying to be snarky, I really recommend you doing a bit more of research on Docker to understand how it works. Also, Docker doesn't make it a pain in the ass to upgrade apps, quite the contrary if you do it in some proper ways.
- IshKebab 10y agoDoesn't statically compiling programs solve the deployment issue better? I mean, as far as I can tell Docker only exists because it's impossible to link to glibc statically, so it's virtually impossible to make Linux binaries that are even vaguely portable. Except now Go and Rust make it very easy to compile static Linux binaries that don't depend on glibc, and even cross-compile them easily. Hell I think it's actually not even that hard to do with C/C++: https://www.musl-libc.org/how.html https://www.musl-libc.org/how.html If I have a binary built by Go, what problems does Docker solve that just copying that binary to a normal machine doesn't?
- themartorana 10y agoYes yes yes. We're nearly 100% Go on the backend and deployment is a breeze. We don't use Docker because it wouldn't give us anything beyond more things to configure. Our CI deploys binaries to S3 and the rest is just as easy.
- jalfresi 10y agoHave to admit, as a fellow Go dev, with single binary static compiles, I don't really GET why I need docker... all it seems to offer is an increased workload and complicated build proc
- phamilton 10y agoIsolation is a strong argument. You don't want one process to starve another. You can get isolation via one-host-per-service or you can get it using cgroups. Docker sort of gives you both, without the waste of one-per-host and with a manageable set of tooling around cgroups.
- CrLf 10y agosystemd runs services in their own cgroup by default and gives you control over the resources alloted to those cgroups.
- invaliduser 10y agoIn my humble case, Docker solves the problems I have to manage the systems on which my application runs (and that's mainly it). A single dockerfile of 20-30 lines describes a whole system (operating system, versions, packages, libraries, etc), and cherry on the cake, I can version it in my git repository. This is not revolutionary in itself, but having the creation and deployment of a server being 100% replicable (+ fast and easy!) on dev, preproduction, and production environments, plus it's managed with my usual versionning tool, that is something I appreciate very much. Sure, there are other tools to do the same, but docker does the job just fine.
- jacques_chester 10y ago> having the creation and deployment of a server being 100% replicable The problem of ensuring that upstream dependencies can be reproducibly installed and/or built is, of course, left as an exercise for the reader.
- ownagefool 10y ago
- oldmanjay 10y agoNamespaced filesystem and networking, just for one. you seem very eager to dismiss a technology you only barely understand.
- IshKebab 10y agoNamespaced filesystem shouldn't even be a special requirement - your program should use relative or at least configurable paths. I mean, directories are namespaced filesystems. What networking problems does Docker solve?
- alexandre_m 10y agoNamespaced FS as in chroot. Your program don't see what else is running on the system. Also means that it removes possible conflicts for shared libraries and other system-wide dependencies. This kind of isolation is not only good for app bundling as a developer, but even more important as an operator in a multi-tenant scenario. You throw in containers and they don't step on each other toes. Plus, system stay clean and it's easy to move things around. Network namespace as in linux network namespace (http://man7.org/linux/man-pages/man8/ip-netns.8.html http://man7.org/linux/man-pages/man8/ip-netns.8.html). Each container has it's own IP stack. Containers provide proper abstractions so you can then assemble all of this, pretty much like you use pipes on a unix shell.
- alexandre_m 10y agoBinaries are one thing, but there are the other abstractions that containers bring in regard to networking and storage. You expose what are the network APIs of your apps (e.g open ports), filesystem mounts, variables (12 factors), etc. Your application becomes a block that you can assemble for a particular deployment; add some environment variables, connect a volume with a particular driver to a different storage backend, connect with an overlay to be able to talk to other containers privately across different servers or even DCs, etc. It's really all about layers of abstraction for operating an application and deploying it to different environments. With the latest container orchestration tools, you can have a catalog of application templates defined simply in Yaml and it's very easy to make it run anywhere. Add some autoscaling and rolling upgrades and it becomes magic for ops (not perfect yet, but checkout latest Kubernetes to see new advancements in this space). With the proper tools and processes, this removes a lot of complexity.
- Svenskunganka 10y ago> add some environment variables, connect a volume with a particular driver to a different storage backend, connect with an overlay to be able to talk to other containers privately across different servers or even DCs, etc. But environment variables already exists without docker. Volumes already exists, aka partitions. "Overlay network" already exists, aka unix sockets or plain TCP/UDP/etc over the loopback interface. I'm not trying to be a dick here, it's just that the points you brought up doesn't really bring anything new to the table. How is this different from just having a couple bare-metal or virtual machines behind a proxy? There are some aspects to containerization that are very feasible, but only at certain scales and the points you brought up makes me question whether you perhaps might be over-engineering things a bit.
- alexandre_m 10y agoIt's about the automation of these things. You now have generic interfaces (Dockerfile, docker-compose, Kubernetes/Rancher templates, etc.) to define your app and how to tie it together with the infrastructure. Having these declarative definitions make it easy to link your app with different SDN or SDS solutions. For example, RexRay for the storage backend abstraction of your container: http://rexray.readthedocs.io/en/stable/ http://rexray.readthedocs.io/en/stable/ You can have the same app connected to either ScaleIO in your enterprise or EBS as storage. We are closer than ever to true hybrid cloud apps and it's now much more easier to streamline the development process from your workstation to production. I think it's pretty exciting :)
- oneplane 10y agoIt seems to me that you're confusing configuration management and containers... Deployments, installations etc. are pretty easy, it's not something containers are actually good at solving. At best you containerize the configuration management itself, which simply makes it harder to work with.
- piva00 10y agoI've been working with configuration management for some years now, apart from also working as a developer so I don't believe I'm confusing them as much as I'm admitting that containers make configuration management and deployment easier. I might not have been so eloquent on that point but it's my feeling from using Docker for the past 2 years. Nowadays all that I do is setup a barebones CoreOS instance and fire away containers at it, be it with kubernetes (and then my config management is a bit more robust so to setup k8s in CoreOS) or just use CoreOS's own fleet if it suffices. Then I get the goodies of containerization such as process isolation, resource-quotas, etc. Like I said: it isn't painless, sometimes much the opposite, but it's worked much better for the lifecycle of most of the products and services I've been working on the past couple years. Even before with automated deployments it wasn't so easy when configuration begins to get hairy. And yes, you can argue that this might be a smell of something else but that's what I've seen happening over and over.