3 ms·
Processes already should be running as different uids Docker makes that way easier. If I want 3 instances of nginx running for different projects, I don't rea
by joevandyk 13y ago
Processes already should be running as different uids
Docker makes that way easier.
If I want 3 instances of nginx running for different projects, I don't really want to setup 3 nginx users (nginx1, nginx2, nginx3).
With Docker, I just start the container and it's isolated from everything else.
- icebraining 13y agoIn Unix & Linux, you don't need to setup users, you can just run the processes under different uids (most process managers support this). Adding a user to /etc/passwd is only needed if you want them to have an username and password.
- ghshephard 13y agoI had no idea this was possible - googling "process under different uid" doesn't yield anything obvious. Any hints on how to do this on a standard command linux prompt?
- lobster_johnson 13y agoThis is one way: # sudo -u "#10000" -g "#10000" id uid=10000 gid=10000 groups=10000
- rsync 13y ago"I had no idea this was possible - googling "process under different uid" doesn't yield anything obvious."" I am looking at the name of this website and I see that this website is named "hacker news".
- coldtea 13y ago>I am looking at the name of this website and I see that this website is named "hacker news" As in "hackers"? People, that is, from all ages, that weren't necessarily born knowing everything, and are not afraid to ask around when they don't know how to do something? If so, then this is the wrong website for this kind of snark.
- cjbprime 13y agoSo unimpressed with this arrogant, insecure behavior. See someone learning something, slap them down.
- stevekemp 13y agoIt's not so hard. I do this myself, I just ran: adduser one; adduser two; adduser three I have about ten UIDs all running their own chrooted copy of thttpd, and then I have a nodejs proxy to route incoming traffic to each instance (which listens on localhost:XXX - where XXX is the UID of the user for neatness).