Live data from Hacker News

LXC vs. Docker

earthly.dev

11–20 of 147 posts

Re: LXC vs. Docker

#11

Apples to oranges. LXC can be directly compared with a small, and quite insignificant, part of Docker: container runtime. Docker became popular not because it can run containers, many tools before Docker could do that (LXC included). Docker became popular because it allows one to build, publish and then consume containers.

i agree, docker added version control, online repository, with management, and search they also fixed some of the networking headaches in lxc. Prior to developing containerd docker was based on lxc containers.

Re: LXC vs. Docker

#12

I use LXC containers as my development environments. When I changed my setup from expensive Mac Books to an expensive work station with a cheap laptop as front end to work remotely this was the best configuration I found. It took me few hours to have everything running but I love it now. New project is creating a new container add a rule to iptables and I have it ready in few seconds.

FWIW I do the same thing but with docker.

Exposing the docker daemon on the network and setting DOCKER_HOST I’m able to use the remote machine as if it was local.

It’s hugely beneficial, I’ve considered making mini buildfarms that load balance this connection in a deterministic way.

Re: LXC vs. Docker

#13

Earlier quoted context omitted.

I recently started using containerd inside Nomad, a breath of fresh and simple air after failed k8s setups!

Oh, Nomad looks interesting. Why should someone reach for it vs K8S?

Nomad can run a lot more things but it’s not so batteries included.

Nomad is trying to be an orchestrator.

Kubernetes is trying to be an operating system for cloud environments.

since they aim for being different things they make different trade offs.

Re: LXC vs. Docker

#14
post #12

I use LXC containers as my development environments. When I changed my setup from expensive Mac Books to an expensive work station with a cheap laptop as front end to work remotely this was the best configuration I found. It took me few hours to have everything running but I love it now. New project is creating a new container add a rule to iptables and I have it ready in few seconds.

FWIW I do the same thing but with docker. Exposing the docker daemon on the network and setting DOCKER_HOST I’m able to use the remote machine as if it was local. It’s hugely beneficial, I’ve considered making mini buildfarms that load balance this connection in a deterministic way.

Do you have any more information about how you're doing this? Whenever I've tried to use Docker as a remote development environment the process felt very foreign and convoluted.

Re: LXC vs. Docker

#15
I think docker grew out of lxc initially(to make lxc easier to use), for now, lxc is light weight but it is not portable, docker can run on all OSes, I think that's the key difference: cross-platform apps. LXC remains to be a linux-only thing.

Re: LXC vs. Docker

#16
LXC via Proxmox is great for stateful deployments on baremetal servers. It's very easy to backup entire containers with the state (SQLite, Postgres dir) to e.g. NAS (and with TrueNAS then to S3/B2). Best used with ZFS raid, with quotas and lazy space allocation backups are small or capped.

Nothing stops one from running Docker inside LXC. For development I usually just make a dedicated priviledged LXC container with nesting enabled to avoid some known issues and painful config. LXC containers could be on a private network and a reverse proxy on the host could map to the only required ports, without thinking what ports Docker or oneself could have accidentally made public.

Re: LXC vs. Docker

#17

Apples to oranges. LXC can be directly compared with a small, and quite insignificant, part of Docker: container runtime. Docker became popular not because it can run containers, many tools before Docker could do that (LXC included). Docker became popular because it allows one to build, publish and then consume containers.

Isn't that where LXD is supposed to fit in?

https://linuxcontainers.org/lxd/

Re: LXC vs. Docker

#18
Is it accurate to say LXC is to Docker as git is to GitHub, or vim/emacs vs. Visual Studio Code?

I haven't seen many examples demonstrating the tooling used to manage LXC containers, but I haven't looked for it either. Docker is everywhere.

Re: LXC vs. Docker

#19

I like the docker way of one thing, one process, per container. LXC seems a bit different. However, an exciting thing to me is the Cambrian explosion of alternatives to docker: podman, nerdctl, even lima for creating a linux vm and using containerd on macos looks interesting.

Docker can have N processes per container though, just depends how you set up your image

Re: LXC vs. Docker

#20

Is it accurate to say LXC is to Docker as git is to GitHub, or vim/emacs vs. Visual Studio Code? I haven't seen many examples demonstrating the tooling used to manage LXC containers, but I haven't looked for it either. Docker is everywhere.

In the first months of Docker, yes. Nowadays, they are different beasts.
Post reply on HN