On the Ubuntu 18.04 (Bionic Beaver) system, I have cloned a project and to run it needs Gradle, but at running the Gradle command gradle swiplRun
I get the following error
Task :dockerRun FAILED docker: 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.39/containers/create?name=swiprolog: dial unix /var/run/docker.sock: connect: permission denied. See 'docker run --help'.
Task :dockerRunStatus FAILED Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.39/containers/swiprolog/json: dial unix /var/run/docker.sock: connect: permission denied
FAILURE: Build completed with 2 failures.
To solve it, I tried:
sudo groupadd docker
sudo usermod -a -G docker myname
"and once with"
sudo gpasswd -a myname docker
So I can run Docker commands without sudo, but the same error. Also ./gradlew --stop
and logout/login and reboot did not work either.
Is it because of Docker or Gradle?
docker
group assigned after all. It didn't work for us for some reason at first, only after we installed Docker according to the documentation mentioned above. – Seigniorage