Hacker News new | ask | show | jobs
by jiggawatts 1212 days ago
As a person who only occasionally needs Linux for specific purposes, something I‘d like is a well-supported mainstream distro for lightweight, high performance servers. Think NGINX, routers, local web proxies, that kind of thing.

Something akin to BSD but Linux. Ideally something that supports a two-stage deployment where you compile for the exact target CPU and then the final thing has no extraneous components at all.

Maybe Nix?

4 comments

> I‘d like a well-supported mainstream distro for lightweight, high performance servers. Think NGINX, routers, local web proxies, that kind of thing.

This might be a shot in the dark, but wouldn't Alpine Linux be a good general purpose candidate for this: https://www.alpinelinux.org/about/

Many use it as a basis for container images, but it also runs pretty well as a regular Linux distro, albeit musl and busybox might present some compatibility challenges in some cases. Regardless, it seems to be pretty lightweight and widely supported, most software that you'd expect is also available and generally there are few surprises.

It does have a somewhat short release lifecycle, though: https://endoflife.date/alpine

You say you need a distro which to me implies you want packages and a repository and updates, installation of packages on the fly, etc. But you also say you want to make a final image with nothing extra except your main apps, which makes me think you don't want a distro.

I'd think about what your goals are and optimize for that use, it's going to be hard to do both the things you mention at once since they are somewhat at odds with each other. IMHO start with Debian, with minimal packages it's very slim yet you have the full power of their packages when necessary.

> You say you need a distro which to me implies you want packages and a repository and updates, installation of packages on the fly, etc. But you also say you want to make a final image with nothing extra except your main apps, which makes me think you don't want a distro.

Isn't this basically what you get when using any minimal install type distro as a base, and also when building Docker images via Nix or similar?

I'm sure nix could do what you're describing (if I read it correctly), although you'd lose the usual benefit of public binary caches, and might need to maintain some patches to cut down features. Gentoo also sounds right; pick the USE flags that describe what you want included, set your CFLAGS to target your CPU, and get a perfectly customized distro.
Why not use BSD though?