Subject: | Can't open socket /var/run/docker.sock: Permission denied |
t/03-socket.t fails on some of my smokers:
...
at /home/cpansand/.cpan/build/2018060718/App-Docker-Client-0.010300-0/blib/lib/App/Docker/Client.pm line 362.
App::Docker::Client::_error_code(App::Docker::Client=HASH(0x55831d71da20), 500, "Can't open socket /var/run/docker.sock: Permission denied", "Can't open socket /var/run/docker.sock: Permission denied at "...) called at /home/cpansand/.cpan/build/2018060718/App-Docker-Client-0.010300-0/blib/lib/App/Docker/Client.pm line 347
App::Docker::Client::_hande_response(App::Docker::Client=HASH(0x55831d71da20), HTTP::Response=HASH(0x55831e135718)) called at /home/cpansand/.cpan/build/2018060718/App-Docker-Client-0.010300-0/blib/lib/App/Docker/Client.pm line 221
App::Docker::Client::get(App::Docker::Client=HASH(0x55831d71da20), "/containers/json") called at t/03-socket.t line 19
FAILURE: 500 - Can't open socket /var/run/docker.sock: Permission denied
Can't open socket /var/run/docker.sock: Permission denied at /opt/perl-5.28.0-RC2/lib/site_perl/5.28.0/LWP/Protocol/http/SocketUnixAlt.pm line 27.
at t/03-socket.t line 19.
# Looks like your test exited with 13 just after 1.
t/03-socket.t .....
Dubious, test returned 13 (wstat 3328, 0xd00)
Failed 1/2 subtests
...
I think this happens if docker is actually installed but the current user has no permissions to use docker (i.e. he's not member of the group, and he's not root).