title: Connecting to unix socket inside docker container using nodejs
body: <p>I have written an app which connect to an already created unix.sock file and get some data from it. But I am getting EACCES error while try to connect. Error message is given below.</p>
  <pre><code>{ Error: connect EACCES /home/unix.sock
      at PipeConnectWrap.afterConnect [as oncomplete] (net.js:1107:14)
    errno: 'EACCES',
    code: 'EACCES',
    syscall: 'connect',
    address: '/home/unix.sock' }
  </code></pre>
  <p>code snippet.</p>
  <pre><code>var socket = net.createConnection(&quot;/home/unix.sock&quot;)
            .on(&quot;connect&quot;, function() {
              console.log(&quot;Connected&quot;);
              socket.write(req1);
              socket.write(req2);
            })
            .on(&quot;data&quot;, function (data) {
              data = JSON.parse(data);
              console.log(&quot;Response from server: %s&quot;, data.response);
              // Close the connection
              socket.end();
            })
            .on('error', function(data) {
              console.log(data);
            })
  </code></pre>
  <p>Any idea about why this error occurs? I think it is because of the non root container. Is there anyway I can get rid of this error with non root container?</p>