ShadowClone
ShadowClone copied to clipboard
Installation Error: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock
Im Getting this error file installing shadow clone...
(env) blackbox@groot:~/tools/ShadowClone$ lithops runtime build sc-runtime -f Dockerfile
2023-05-21 16:58:48,375 [INFO] config.py:134 -- Lithops v2.8.0
2023-05-21 16:58:48,375 [DEBUG] config.py:93 -- Loading configuration from /home/blackbox/.lithops/config
2023-05-21 16:58:48,406 [DEBUG] config.py:186 -- Loading Serverless backend module: aws_lambda
2023-05-21 16:58:48,496 [DEBUG] aws_lambda.py:52 -- Creating AWS Lambda client
2023-05-21 16:58:48,496 [DEBUG] aws_lambda.py:65 -- Creating Boto3 AWS Session and Lambda Client
2023-05-21 16:58:49,699 [INFO] aws_lambda.py:94 -- AWS Lambda client created - Region: us-east-1
2023-05-21 16:58:49,701 [INFO] aws_lambda.py:342 -- Building runtime sc-runtime from Dockerfile
2023-05-21 16:58:49,702 [DEBUG] utils.py:230 -- Creating function handler zip in lithops_lambda.zip
Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post "http://%2Fvar%2Frun%2Fdocker.sock/v1.24/build?buildargs=%7B%7D&cachefrom=%5B%5D&cgroupparent=&cpuperiod=0&cpuquota=0&cpusetcpus=&cpusetmems=&cpushares=0&dockerfile=Dockerfile&labels=%7B%7D&memory=0&memswap=0&networkmode=default&rm=1&shmsize=0&t=sc-runtime&target=&ulimits=null&version=1": dial unix /var/run/docker.sock: connect: permission denied
Traceback (most recent call last):
File "/home/blackbox/tools/ShadowClone/env/bin/lithops", line 8, in <module>
sys.exit(lithops_cli())
File "/home/blackbox/tools/ShadowClone/env/lib/python3.10/site-packages/click/core.py", line 1130, in __call__
return self.main(*args, **kwargs)
File "/home/blackbox/tools/ShadowClone/env/lib/python3.10/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/home/blackbox/tools/ShadowClone/env/lib/python3.10/site-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/blackbox/tools/ShadowClone/env/lib/python3.10/site-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/blackbox/tools/ShadowClone/env/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/blackbox/tools/ShadowClone/env/lib/python3.10/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/home/blackbox/tools/ShadowClone/env/lib/python3.10/site-packages/click/decorators.py", line 26, in new_func
return f(get_current_context(), *args, **kwargs)
File "/home/blackbox/tools/ShadowClone/env/lib/python3.10/site-packages/lithops/scripts/cli.py", line 456, in build
compute_handler.build_runtime(runtime_name, file, ctx.args)
File "/home/blackbox/tools/ShadowClone/env/lib/python3.10/site-packages/lithops/serverless/serverless.py", line 66, in build_runtime
self.backend.build_runtime(runtime_name, file, extra_args)
File "/home/blackbox/tools/ShadowClone/env/lib/python3.10/site-packages/lithops/serverless/backends/aws_lambda/aws_lambda.py", line 354, in build_runtime
utils.run_command(cmd)
File "/home/blackbox/tools/ShadowClone/env/lib/python3.10/site-packages/lithops/utils.py", line 713, in run_command
sp.check_call(cmd.split())
File "/usr/lib/python3.10/subprocess.py", line 369, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/usr/bin/docker', 'build', '-t', 'sc-runtime', '-f', 'Dockerfile', '.']' returned non-zero exit status 1.
And when i try to run this as root
(env) blackbox@groot:~/tools/ShadowClone$ sudo lithops runtime build sc-runtime -f Dockerfile
sudo: lithops: command not found
Anyone help me on this when im try to downgrade python version to 3.9 my ubuntu desktop not working properly and its broking!
what os is require because ubuntu is not wokring with python 3.9
sudo usermod -aG docker $USER.
add user as superuser for docker and sudo reboot
Hey @sakyb7 , did you have any luck in fixing the error you mentioned in your first message? I have the same problem too. However, this problem only occurs on the test server that I have removed 3.10 and only installed 3.9