title: How do i give a non root user access to docker when using docker-dind?
body: <p>I'm trying to run a Go CD agent using docker-dind to auto build some of my docker images.</p>
  
  <p>I'm having trouble getting the user <code>go</code> to have access to the docker daemon. </p>
  
  <p>When I try and access docker info I get the following:</p>
  
  <pre><code>[go] Task: /bin/sh ./builder.shtook: 2.820s
  [START]
  [USER]  go
  [TAG]  manual
  
  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.32/containers/fish/angular-cli/json: dial unix /var/run/docker.sock: connect: permission denied
  Sending build context to Docker daemon  3.072kB
  
  Step 1/8 : FROM node:8-alpine
   ---&gt; 4db2697ce114
  Step 2/8 : MAINTAINER jack@fish.com
   ---&gt; Using cache
   ---&gt; 22f46bf6b4c1
  Step 3/8 : VOLUME /usr/local/share/.cache/yarn/v1
   ---&gt; Using cache
   ---&gt; 86b979e7a2b4
  Step 4/8 : RUN apk add --no-cache --update build-base python
   ---&gt; Using cache
   ---&gt; 4a08b0a1fc9d
  Step 5/8 : RUN yarn global add @angular/cli@1.5.3
   ---&gt; Using cache
   ---&gt; 6fe4530181a5
  Step 6/8 : EXPOSE 4200
   ---&gt; Using cache
   ---&gt; 480edc47696e
  Step 7/8 : COPY ./docker-entrypoint.sh /
   ---&gt; Using cache
   ---&gt; 329f9eaa5c76
  Step 8/8 : ENTRYPOINT /docker-entrypoint.sh
   ---&gt; Using cache
   ---&gt; cb1180ff8e9f
  Successfully built cb1180ff8e9f
  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.32/containers/fish/angular-cli/json: dial unix /var/run/docker.sock: connect: permission denied
  </code></pre>
  
  <p>My <code>root</code> user <em>can</em> accesss docker info properly, but the <code>go</code> user fails.</p>
  
  <pre><code>$ cat /etc/group
  root:x:0:root
  bin:x:1:root,bin,daemon
  daemon:x:2:root,bin,daemon
  sys:x:3:root,bin,adm
  ....
  adm:x:4:root,adm,daemon
  wheel:x:10:root
  xfs:x:33:xfs
  ping:x:999:
  nogroup:x:65533:
  nobody:x:65534:
  dockremap:x:101:dockremap,go
  go:x:1000:go
  </code></pre>
  
  <p>My docker.sock permissions are as follows:</p>
  
  <pre><code>$ ls -alh /var/run/docker.sock
  srw-rw----    1 root     993            0 Apr 20  2017 /var/run/docker.sock
  </code></pre>
  
  <p>What do I need to append to my Dockerfile in order to allow the <code>go</code> user to access the docker daemon? </p>