lukaszlach / clip

:whale: Docker Client Plugins Manager - build new plugins, publish them on Docker Hub or just try some plugins from the catalog and install them locally
https://lach.dev/clip
MIT License
133 stars 13 forks source link

Cannot run as root? #11

Closed mikesir87 closed 5 years ago

mikesir87 commented 5 years ago

I see, in the code below that it is preventing the plugin from running while the root user. While this might make sense in normal deploys, it does prevent execution in some environments (like on PWD). Since I use PWD for a lot of demos, I run into this often. Is it needed? I can easily make a PR, but figured I'd ask first. 😄

https://github.com/lukaszlach/clip/blob/73b6c22a90348195915a8788fe9a2fa2811c28c2/docker-clip#L217-L220

lukaszlach commented 5 years ago

Plugins are installed and managed inside user HOME (https://github.com/lukaszlach/clip/blob/73b6c22a90348195915a8788fe9a2fa2811c28c2/docker-clip#L19). I have not been testing this against root, but if you can test that and make a PR it would be nice to support root as well :)

mikesir87 commented 5 years ago

Makes sense to install in user's home. But, if you're running as root, that block prevents the root user from using clip. Ran into this on Play-with-Docker, as those instances are running as the root user. I'll send a PR, but wanted to find out if there was any reason root was specifically being called out and prevented. 👍