title: Run docker-compose inside docker:dind
body: <p>This question is not the duplicate of <a href="https://stackoverflow.com/questions/54711502/docker-compose-inside-alpine-container">this</a>. The issue in that question is with starting a <code>docker</code> instance but this one is associated with binding <code>docker</code> with <code>docker-compose</code>.</p>
  
  <p>I am trying to run <code>docker-compose</code> inside <code>docker:dind</code> image.
  So created my own image with following <code>Dockerfile</code>.</p>
  
  <pre><code>FROM docker:dind
  RUN apk add py-pip
  RUN apk add python-dev libffi-dev openssl-dev gcc libc-dev make
  RUN pip install docker-compose
  RUN addgroup ${USER} docker
  </code></pre>
  
  <p>But running <code>docker-compose</code> command throws following error,</p>
  
  <pre><code>yarn run v1.16.0
  $ docker-compose -f docker-compose.yml run test
  info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
  
  lerna ERR! yarn run test stderr:
  Couldn't connect to Docker daemon at http+docker://localhost - is it running?
  
  If it's at a non-standard location, specify the URL with the DOCKER_HOST environment variable.
  error Command failed with exit code 1.
  </code></pre>
  
  <p>How can it be fixed. The os in <code>docker:dind</code> is <code>Alpine</code> linux.</p>