Hacker News new | ask | show | jobs
by bayindirh 809 days ago
I don't think so. Instead we created an artifact which can live inside an OS, but cannot see and touch to the rest of the OS.

CGroups is a deceptively powerful mechanism. You can isolate a process resource wise (X cores, Y amount of memory, Z amount of swap), network wise (a different virtual network adapter with its own IP, bandwidth limits, etc.) and FS wise (running in its own filesystem with devices it can see).

It can keep your system tidy by encapsulating elaborate stacks which makes system management painful, allows deterministic operation and image generation if you tag everything with version.

Downside is you can do bad things with it like terminating HTTPS with a gateway container and talk HTTP among your backend instead of configuring tools, or writing shoddy software, and getting away with it because it works, or gets automatically restarted when it crashes 6 times a day.

I don't run every service as a container, because some services suffocate when they are in a container, but for short running things which needs system-wide changes to function, or test-driving small services before fully committing, it's a good tool to have.

However, it's abused with no end, and their popular use leaves a bad taste in your mouth.

1 comments

You can put any given process is a cgroup. It doesn't have to be a container.

If you have a statically linked executable, setup the cgroup for it as you will. No containers needed. You can namespace is as well.

No `FROM X` `RUN Y` dockerfile stuff needed.

> You can put any given process is a cgroup. It doesn't have to be a container.

Yes, I run many programs inside cgroups, but not in containers.

> If you have a statically linked executable, setup the cgroup for it as you will. No containers needed. You can namespace is as well.

Yes.

> No `FROM X` `RUN Y` dockerfile stuff needed.

Yes. dockerfile only sets up the chroot in an overlayfs and fires up the "container" using mechanisms present in the kernel already.

As I said on another comment, quoting myself:

> Docker just made the interface more practical, and built the ecosystem around it.