newrelic / centurion

A mass deployment tool for Docker fleets
MIT License
1.76k stars 113 forks source link

Check permissions on remote Docker socket before forwarding it #191

Closed benweint closed 4 years ago

benweint commented 5 years ago

Right now, if you try to run an SSH-based deploy with a user who doesn't actually have access to the Docker socket on the remote host, you get a rather un-helpful exception that looks like this:

Excon::Error::Socket: end of file reached (EOFError)

With this change, you'll get a somewhat more helpful error message that says:

RuntimeError: Docker socket at '/var/run/docker.sock' was not writable by user '<user>' on '<host>'. Is this user in the 'docker' group?