3 ms·
One huge advantage over docker is that if you mount a directory into the container, and the container writes files there, on the host system they always have th
by perlgeek 6y ago
One huge advantage over docker is that if you mount a directory into the container, and the container writes files there, on the host system they always have the owner of the user that started the container.
That makes it much more convenient for build environments, without having to hard-code user IDs both in the container and on the host.
- Spivak 6y agoIf you're on a Linux system you can actually make this work better with sssd. So sssd's architecture is actually client-server over a unix socket. So all you need to do is create a very simple base container layer that just installs sssd-client, and wires up /etc/nsswitch.conf to use it (your package manager will almost surely do this automatically). Then just bind mount the sssd socket into your container and boom, all your host users are in the container. If you already log in with sssd you're done. But if you only use local users then you'll need to configure the proxy provider so that sssd reads from your passwd on your host. In this case the host system doesn't actually have to use sssd for anything.
- perlgeek 6y agoSounds interesting, do you have a link to an example where this is done/demonstrated? (Also I'm not sure how that's better (and not just different), except maybe it allows more than one host user in the container, but I haven't had a use case for that).
- kortex 6y agoThis is glorious and just the thing I was looking for. I am trying to move towards an even more container based dev environment, basically shell into long running containers. Maybe even window manager in docker . Totally eliminates dependency hell, e.g. ROS heavy workflows where it wants to control every part of your environment.