aj-may / dotdocker

🐳 A utility to help setup a docker development environment with host based routing
MIT License
40 stars 10 forks source link

Error report for docker socket permissions #25

Open ocgordon opened 5 years ago

ocgordon commented 5 years ago

Is your feature request related to a problem? Please describe. N/A

Describe the solution you'd like Catching and throwing a more user friendly error message informing the user that they do not have permissions to write to the Docker socket.

Describe alternatives you've considered N/A

Additional context Current result when user does not have Docker socket write permissions:

    ❯ Start proxy
      ✖ Pulling codekitchen/dinghy-http-proxy:latest
        → connect EACCES /var/run/docker.sock
        Creating dotdocker-proxy
        Starting dotdocker-proxy
    ❯ Start dnsmasq
      ⠙ Pulling andyshinn/dnsmasq:latest
        Creating dotdocker-dnsmasq
        Starting dotdocker-dnsmasq
    Setting up DNS
(node:80954) UnhandledPromiseRejectionWarning: Error: connect EACCES /var/run/docker.sock
    at Object._errnoException (util.js:1022:11)
    at _exceptionWithHostPort (util.js:1044:20)
    at PipeConnectWrap.afterConnect [as oncomplete] (net.js:1198:14)
(node:80954) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:80954) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
aj-may commented 2 years ago

@ocgordon are you still seeing this issue?