lambda-docker
lambda-docker copied to clipboard
<class 'docker.errors.DockerException'> at / Error while fetching server API version: ('Connection aborted.', error(13, 'Permission denied'))
1.Run container by command:docker run -d -v /var/run/docker.sock:/var/run/docker.sock -v /tmp:/tmp -p 8080:8080 tobegit3hub/lambda-docker 2.open browser,visit :http://10.110.13.31:8080/ 3.edit python2.7 shell,then error occurs
Question:did i need to config my docker daemon?
You don't need to configure anything if you have installed docker daemon in Linux.
It seems "Permission denied". Can you access /var/run/docker.sock or run with sudo?
I have root authority .what's the meaning of " access /var/run/docker.sock"?
I configure my docker daemon(version 1.10) with --selinux-enabled -H tcp://0.0.0.0:2375 -H unix:///var/run/docker.sock --insecure-registry 10.110.13.187:5001.
I fixed this problem.Use command:docker run -d -v /var/run/docker.sock:/var/run/docker.sock -v /tmp:/tmp --privileged=true -p 8090:8080 tobegit3hub/lambda-docker,then fixed
Nice try and thanks for your comment.
I'm not sure if --privileged=true is necessary to access latest docker socket file now. Anyway, I'm gonna add this in README so that everyone can use it easily.
If you're interested, any PR about this will be welcome. @stefiane
In my scene, because I have root authority,then ‘Permission denied’ occured.Example ,I test Python2.7 by web page(online code),then a container based image(python:2.7) is running,but docker logs <yourcontainerID> return info:python: can't open file 'main.py': [Errno 13] Permission denied.
So I propose to add privileged=true when you create container in your source code. @tobegit3hub