Hacker News new | ask | show | jobs
by BobbyTables2 165 days ago
How does one run docker inside an unprivileged LXC container?

If a developer can run Docker inside this, what stops them from mounting volumes from the host or changing namespaces?

Is this relying on user namespaces ?

1 comments

Good questions — yes, Containarium relies heavily on *user namespaces*. Here’s how it works:

- We enable `security.nesting=true` on unprivileged LXC containers, so Docker can run inside (rootless).

- *User namespace isolation* ensures that even if a user is “root” inside the container, they are mapped to an unprivileged UID on the host (e.g., UID 100000), preventing access to host files or devices.

This setup allows developers to run Docker and do almost anything inside their sandbox, while keeping the host safe.