sourcegraph / python-langserver

Language server which talks LSP via JSONRPC for Python.
MIT License
102 stars 12 forks source link

Can't run langserver in container with non-root user #34

Closed renfredxh closed 6 years ago

renfredxh commented 6 years ago

docker run python langserver with the --user=1000:2000 flag. After trying to make a request, you get the following error:

Traceback (most recent call last):
  File "/src/langserver/langserver.py", line 92, in route_and_respond
    resp = handler(request)
  File "/src/langserver/langserver.py", line 166, in serve_initialize
    self.workspace = Workspace(self.fs, self.root_path, originalRootUri)
  File "/src/langserver/workspace.py", line 115, in __init__
    os.makedirs(self.PACKAGES_PATH)
  File "/usr/local/lib/python3.6/os.py", line 210, in makedirs
    makedirs(head, mode, exist_ok)
  File "/usr/local/lib/python3.6/os.py", line 220, in makedirs
    mkdir(name, mode)
PermissionError: [Errno 13] Permission denied: 'python-langserver-cache'