5 ms·
Great. I run everything on LXC and this is a step in the right direction. LXC is so much better to work with than Docker.
by unixhero 8y ago
Great. I run everything on LXC and this is a step in the right direction. LXC is so much better to work with than Docker.
- StreamBright 8y agoSame here. Docker is a collection of anti-patterns while LXC is pretty lean and we use it in production for long time withou issues.
- tssva 8y agoA screwdriver seems like an anti-pattern when you are trying to hammer in a nail with it. Because of the buzz around it Docker suffers from people trying to use it to solve problems it wasn't intended to. I use both Docker and LXC but for very different use cases. I find both to be great tools when used to solve the problems they were intended for.
- mpweiher 8y agoCan you elaborate on the different use cases? I've seen a bunch of LXC/Docker comparisons, but they focused on features.
- segmondy 8y agoLxc is a system container Docker is an application container. Use lxc in place of a VM, where you might want to login or even have others login. It has the same problem as a regular system, snowflakes. Changes can be made that might cause an application to behave differently if there are multiple deployments or you have to rebuild. Docker is for having a consistent application environment so your app behaves exactly the same every time it's deployed. I use lxc and did before docker. It took a while for me to accept docker. It takes understanding the difference.
- mirceal 8y agoThis does not make sense. There’s no such thing as a system containter. You can absolutely leverage lxc instead of docker if you want to. The major difference is that docker gives you 1 process by container and has 1) nailed down a container definition fornat 2) the registry for images. So Docker makes the whole container thing more accesible, but in the end both rely on the same kernel features + overlay filesystems.
- stephenr 8y agoA “system” container here means a container running an init so it can be multi process and operate like a lightweight vm.
- mirceal 8y agoif you’re looking at the kernel features used (namespaces, cgroups, etc) containers are multiprocess (even with docker you can go attach into the container and look at things). This may be semantics, but the first process in the container is an “init” regardless if it’s a proper init or just a process. As far as light-weight VMs: containers are supposed to be lightweight VMs (But defining lightweight can be challenging)
- stephenr 8y agoDocker is designed to be a 'application' container - 1 process per container. LXC is designed to be a 'system' container - an entire OS except the Kernel per container. People mis-use tools all the time - that doesn't change their original design or intended use.
- mirceal 8y agolet's agree to disagree on this one. I am not sure that system and application container are or should be different, but it's okay if we have a different opinion.
- solipsism 8y agoWithout giving us a hint of what those anti-patterns are, your comment is quite useless. There seems to be tacit agreement among most participants of this discussion that both Docker and LXC have their place, for different use cases. You seem to be saying something different. Could you elucidate?
- erric 8y agoCan you give examples as to why it’s better vs Docker?
- xorcist 8y agoWhat's "better" is too ill-defined to have an opinion on, but I can say from experience that I've had to hunt more than a few intermittent problems not only in Docker but in Linux itself due to the bizarre ways Docker tries to reinvent the world, while LXC has been mostly solid even under load.
- chrisper 8y agoLXC is more natural if you expect docker to behave like a VM.
- cookiecaper 8y agoYeah, this is the key thing. People think Docker is the only way to run a container and they do all kinds of silly hacks to try to keep Docker containers alive and to get them to behave like normal VMs. There's no reason for that: you can use LXC, or better, illumos zones or BSD jails. In the real world, Docker's limited-liftime execution paradigm is the niche requirement. Everyone else just wanted lightweight VMs.
- jitl 8y agoEveryone’s “real world” is different. Docker’s model works great for distributing heterogeneous tools. At work, we have teams shipping python, ruby, and nodejs CLI programs inside Docker wrappers. Greatly reduces packaging frustration on end-user systems. I run most of my home services in jails, but I am eager to rebuild them as Docker containers, because I’d rather have a single init on the host system run several containerized processes, then my current setup which is a tree of inits that makes monitoring more difficult than a single `sv status /service/*`.
- erric 8y agoCoreOS rkt also looks like a good competitor to docker.
- klippoteket 8y agoAgree! I love lxc. If you have to you can run docker under lxc. No problems.
- craftyguy 8y agoWeren't early versions of docker based on lxc? Not that it matters for the point you are making, but it's just interesting that docker decided to drop lxc, and I'm glad lxc was able to survive (assuming docker folks contributed meaningfully to lxc when they used them...)