subuser-security / subuser

Run programs on linux with selectively restricted permissions.
http://subuser.org
GNU Lesser General Public License v3.0
890 stars 65 forks source link

Stack trace when trying to run a subuserized program without docker running. #48

Closed timthelion closed 10 years ago

timthelion commented 10 years ago

timothy@timothy:~/configs/xmodmap.d/lenovo$ firefox 2014/02/17 12:36:44 dial unix /var/run/docker.sock: no such file or directory Traceback (most recent call last): File "/home/timothy/subuser/logic/subuserCommands/run", line 143, in runProgram(programName) File "/home/timothy/subuser/logic/subuserCommands/run", line 51, in runProgram dockerImageName = subuserlib.dockerImages.getImageTagOfInstalledProgram(programName) File "/home/timothy/subuser/logic/subuserCommands/subuserlib/dockerImages.py", line 21, in getImageTagOfInstalledProgram roughImagesList = subprocess.check_output(["docker","images"]) File "/usr/lib/python2.7/subprocess.py", line 544, in check_output raise CalledProcessError(retcode, cmd, output=output) subprocess.CalledProcessError: Command '['docker', 'images']' returned non-zero exit status 1

timthelion commented 10 years ago

If we're going to solve https://github.com/timthelion/subuser/issues/43 by starting a new docker deamon for each user then this will be solved because then, running any subuser program(when the given user's docker deamon wasn't running) would automatically launch the deamon.

https://github.com/timthelion/subuser/issues/14 should be solved first because this will add a module to subuserlib which handles su/sudo weirdness.

peter1000 commented 10 years ago

I don't think it's a big problem: your suggested order of action looks fine.

I guess it's anyway easy to check with a subprocess call if docker runs or not.

timthelion commented 10 years ago

Fixed: https://github.com/subuser-security/subuser/commit/3bea3cea15ed68a9d1fcb6c34128ee0ef69adae5