Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

check the docker permission before runing #42

Open
Squirre17 opened this issue Jul 20, 2024 · 0 comments
Open

check the docker permission before runing #42

Squirre17 opened this issue Jul 20, 2024 · 0 comments

Comments

@Squirre17
Copy link
Owner

python docker don't have permission to initialize Docker class even through user don't need docker actually.

Traceback (most recent call last):
  File "/home/squ/Prac/linux-kernel-compile-wksp/autokd/main.py", line 5, in <module>
    from autokd.kdocker   import kdocker 
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/squ/Prac/linux-kernel-compile-wksp/autokd/autokd/kdocker.py", line 64, in <module>
    kdocker = Docker()
              ^^^^^^^^
  File "/home/squ/Prac/linux-kernel-compile-wksp/autokd/autokd/kdocker.py", line 23, in __init__
    self.client   : DockerClient = docker.from_env()
                                   ^^^^^^^^^^^^^^^^^
  File "/home/squ/.pyenv/versions/3.11.8/lib/python3.11/site-packages/docker/client.py", line 94, in from_env
    return cls(
           ^^^^
  File "/home/squ/.pyenv/versions/3.11.8/lib/python3.11/site-packages/docker/client.py", line 45, in __init__
    self.api = APIClient(*args, **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/squ/.pyenv/versions/3.11.8/lib/python3.11/site-packages/docker/api/client.py", line 207, in __init__
    self._version = self._retrieve_server_version()
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/squ/.pyenv/versions/3.11.8/lib/python3.11/site-packages/docker/api/client.py", line 230, in _retrieve_server_version
    raise DockerException(
docker.errors.DockerException: Error while fetching server API version: ('Connection aborted.', PermissionError(13, 'Permission denied'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant