r/docker•
igfmilfs

How to achieve container individual namespacing

I am quite frustrated so please forgive my tone.

After some hours of going back and forth with chat retardpt it told me I could achieve true namespacing on a container individual basis, by creating a namespace on the linux host per container, chown all the bindmounts to these new namespace UID's and GID's, and then create service users to reffer to in the yaml files.

After some testing, I noticed it didn't make a single difference if I would include the namespace user in my compose yaml files or not. Basically proving that the entire system wasn't working as suposed to.

HOW can I achieve namespacing per container? I don't want to run all the containers in one big seperate namespace, because if a hacker was to break out somehow out of a container, I don't want it able to reach other containers bindmounts.

Please help me out.

System:
- Docker Engine on Ubuntu desktop
- Running multiple containers (17) in multiple stacks (7)
- Dockge for container management/deployment

Thanks!

Posted Feb 19, 2026, 3:10 PM UTC · edited

010
Loading comments…