osrf / rocker

A tool to run docker containers with overlays and convenient options for things like GUIs etc.
Apache License 2.0
584 stars 75 forks source link

rocker backtraces when insufficient permissions for docker access #236

Closed tfoote closed 1 year ago

tfoote commented 1 year ago

If you don't have sudoleess docker access rocker creates a backtrace. Even for -h

~/ws/rockerenv$ rocker --help
usage: rocker [-h] [--noexecute] [--nocache] [--nocleanup] [--pull]
              [--version] [--cuda] [--dev-helpers] [--devices [DEVICES ...]]
              [--env NAME[=VALUE] [NAME[=VALUE] ...]] [--env-file ENV_FILE]
              [--expose EXPOSE] [--git] [--git-config-path GIT_CONFIG_PATH]
              [--group-add GROUP_ADD] [--home] [--name NAME]
              image [command ...]
rocker: error: DependencyMissing encountered: Docker Client failed to connect to docker daemon. Please verify that docker is installed and running. As well as that you have permission to access the docker daemon. This is usually by being a member of the docker group. The underlying error was:
"""
Error while fetching server API version: ('Connection aborted.', PermissionError(13, 'Permission denied'))
"""

It should catch that error and give a helpful message.

tfoote commented 1 year ago

Duplicate of #34