Securing Services with Rootless Containers
Posted by speckx 5 days ago
Comments
Comment by raesene9 8 hours ago
As a result, if you're looking for good security isolation, I'd say a (Micro)VM is a better option. The other route is hardening down your container runtime with seccomp/AppArmor/SELinux but that can be a tricky game.
Comment by merpkz 5 hours ago
Comment by raesene9 5 hours ago
As a result I reckon there's more vulnerable containers that you might expect.
Also depending on the environment there's things like dirtyclone https://github.com/raesene/vuln_pocs/tree/main/CVE-2026-4350... which can be triggered where the attacker can start new containers.
Comment by seemaze 19 hours ago
See the discussion here:
https://github.com/podman-container-tools/podman/discussions...
Comment by lugoues 17 hours ago
Rootless containers have their place, actual userspace workloads. Things like dev containers or normal users running containers but if one is creating users to run system level services then they are just adding extra steps imo.
Comment by samhclark 2 hours ago
"Migrating" because secrets management was a bit of a pain. I ended up with pretty close to the same design as this article though. (I put an extra layer of complexity in mine, we'll see if I regret it)
Along with the other folks in this thread, I don't think we can stop at rootless in 2026. But I'm optimistic that dropping in libkrun as the runtime will be an easy next step, given its integration with podman (--runtime=krun).
If the author tackles that next, I'd be interested in reading about it
Comment by kayson 19 hours ago
I deploy docker compose files with ansible so everything comes with built in security defaults like rootless, dropped caps, no new privileges, etc. I wish more containers supported running read only (its usually pretty easy to add, just overlooked) and distroless (common for go apps, less so otherwise).
There was a pretty good comment on reddit a while back with a list of hardenings for compose files [1]
1. https://www.reddit.com/r/selfhosted/comments/1pr74r4/comment...
Comment by drnick1 17 hours ago
Comment by merpkz 5 hours ago
docker run -ti --rm --user 1000:1000 --privileged=false alpine:latest
~ $ cat /proc/sys/net/ipv4/ip_unprivileged_port_start
0
~ $ id
uid=1000 gid=1000 groups=1000
~ $ nc -lvp 80
listening on [::]:80 ...
Also the iptable rules Docker creates is for routing traffic to container with destination NAT, to actually limit traffic you have to do it yourself by inserting rules in DOCKER_USER chain.Comment by nine_k 15 hours ago
Comment by LelouBil 16 hours ago
Comment by capecodes 13 hours ago
makes it trivial to do the dhi/rootless thing but do ad-hoc debugging and then remove the debugging tools entirely, leaving no trace/bloat behind (just one file)
Comment by latchkey 18 hours ago
Comment by zerof1l 18 hours ago
Comment by bityard 17 hours ago
Comment by nine_k 15 hours ago
Comment by bubblebeard 10 hours ago
Comment by dboreham 17 hours ago
It does run on IBM 370 type mainframes, but that port was done years after it first ran on the 386, and isn't in any way relevant to low port numbers.
Comment by Narushia 17 hours ago
[1]: https://docs.podman.io/en/stable/markdown/podman-kube.unit.5...
Comment by Lucasoato 16 hours ago
Comment by firasd 18 hours ago
Comment by ranger_danger 19 hours ago
Currently it's difficult to even get a hold of a properly configured minimal kernel (or time-consuming to try to build one) and all the right command-line incantations to even start a one-off microvm using say, qemu, with all the proper storage/networking/etc. bits one needs for production environments. Plus you need to keep that kernel updated very regularly.
I know there's projects like smolvm that try to make this simpler, but I've had some major problems with those solutions as well, and I just feel like the big boys need to step up and support this directly by now.
Comment by teravor 17 hours ago
runsc (gvisor)
Kata Containers (virtualization)
both drop in replacements for runc (default OCI runtime)
there are others too. one based on libkrun : https://github.com/containers/crun/blob/main/krun.1.md
and these are just runc replacements.
with some minor scripting you can roll a CLI solution using any of gvisor, cloud-hypervisor, firecracker, muvm (libkrun).
Comment by burakemir 18 hours ago
Comment by ranger_danger 13 hours ago
Comment by binsquare 13 hours ago
Comment by ranger_danger 11 hours ago
Comment by dagss 17 hours ago
Comment by jorams 9 hours ago
Comment by ranger_danger 2 minutes ago
Comment by eyberg 19 hours ago
As for orchestration - a lot of folks think you need a completely new orchestration system for dealing with vms but we just simply re-use the existing infrastructure that already exists - the public clouds. Those companies have tens of thousands of engineers that are much better than the average engineer at this stuff, custom hardware, custom protocols and close to several decades of existing deployment.
I can build and ship a vm from my laptop/ci to prod on AWS/GCP in ~tens of second. Granted I come from the camp that thinks deploying full blown general purpose operating systems to prod is an increasingly incredibly risky practice.
Comment by dboreham 16 hours ago
Comment by FooBarWidget 16 hours ago
Comment by HackerThemAll 5 hours ago
Comment by croemer 13 hours ago
Comment by Shreysid 5 days ago