Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

"tweak docker develop" fails if docker group doesn't exist #398

Open
msrb opened this issue Oct 15, 2015 · 1 comment
Open

"tweak docker develop" fails if docker group doesn't exist #398

msrb opened this issue Oct 15, 2015 · 1 comment

Comments

@msrb
Copy link
Contributor

msrb commented Oct 15, 2015

It looks like docker support in DevAssistant is tied to existence of "docker" group. This group doesn't exist in some distributions (e.g. Fedora 22). More importantly, the recommendation seems to be to use "sudo" instead.

We should probably rethink how we want to interact with docker daemon.

(stack trace from DA in F22, i.e. v0.11.2)

Traceback (most recent call last):
  File "/usr/bin/da", line 9, in <module>
    load_entry_point('devassistant==0.11.2', 'console_scripts', 'da')()
  File "/usr/lib/python3.4/site-packages/devassistant/cli/cli_runner.py", line 78, in run
    to_run.run()
  File "/usr/lib/python3.4/site-packages/devassistant/path_runner.py", line 55, in run
    self._run_path_run('', self.parsed_args)
  File "/usr/lib/python3.4/site-packages/devassistant/path_runner.py", line 33, in _run_path_run
    self.path[-1].run(stage, parsed_args)
  File "/usr/lib/python3.4/site-packages/devassistant/yaml_assistant.py", line 30, in inner
    return method(self, *args, **kwargs)
  File "/usr/lib/python3.4/site-packages/devassistant/yaml_assistant.py", line 251, in run
    return lang.run_section(getattr(self, to_run, {}), kwargs, runner=self)
  File "/usr/lib/python3.4/site-packages/devassistant/lang.py", line 145, in run_section
    return eval_exec_section(section, kwargs, runner)
  File "/usr/lib/python3.4/site-packages/devassistant/lang.py", line 167, in eval_exec_section
    retval = run_section(to_run, kwargs, runner=runner)
  File "/usr/lib/python3.4/site-packages/devassistant/lang.py", line 145, in run_section
    return eval_exec_section(section, kwargs, runner)
  File "/usr/lib/python3.4/site-packages/devassistant/lang.py", line 187, in eval_exec_section
    comm_ret = eval_exec_section(comm, kwargs, runner)
  File "/usr/lib/python3.4/site-packages/devassistant/lang.py", line 202, in eval_exec_section
    retval = Command(comm_type, comm, kwargs=kwargs).run()
  File "/usr/lib/python3.4/site-packages/devassistant/lang.py", line 60, in run
    return cr(self).run()
  File "/usr/lib/python3.4/site-packages/devassistant/command_runners.py", line 994, in run
    self._docker_check_setup()
  File "/usr/lib/python3.4/site-packages/devassistant/command_runners.py", line 1030, in _docker_check_setup
    if not DockerHelper.user_in_docker_group(user):
  File "/usr/lib/python3.4/site-packages/devassistant/command_helpers.py", line 660, in user_in_docker_group
    return username in grp.getgrnam('docker').gr_mem
KeyError: 'getgrnam(): name not found: docker'
@tradej
Copy link
Member

tradej commented Oct 15, 2015

Truth be told, we shouldn't use the docker group at all (as described in this or this blog post).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants