dex4er / nss-docker

NSS module for finding Docker containers
GNU Lesser General Public License v2.1
42 stars 14 forks source link

initial lxc support #1

Closed jrwren closed 9 years ago

jrwren commented 9 years ago

kinda sucks right now because its root only

Would you accept something like this?

dex4er commented 9 years ago

It is very interesting. I think I rather start new repo ie. nss-lxc, because I don't want to link with liblxc when I don't use LXC containers.

Then it will be easier to configure nsswitch.conf with LCX support or Docker support only.

jrwren commented 9 years ago

I thought you might say that. Really good points that I didn't think about until after I posted this. Thanks for the feedback. Also, thanks for the project. It is cool and the code is easy to follow. It was great to learn how NSS plugins are written.

dex4er commented 9 years ago

I see another problem: liblxc works in that way: every time you call gethostbyname, new process is started by fork and then new process enters LXC's namespace and communicates to its parent in host's namespace. It sucks. It could suck less if you'll write separate server for handling such requests and nss module which will communicate with this server.

jrwren commented 9 years ago

Ugh. Is that what liblxc is doing inside that library. YUCK. Ah well, I see it as mostly an interim feature before talking to lxd. Thanks for the heads up.