title: ERROR: Could not connect to Docker daemon at http+docker://localhost - is it running?
body: <p>This is my <strong>dockerfile</strong></p>
  
  <pre><code>
  FROM ubuntu:latest
  
  RUN apt-get update \
      &amp;&amp; apt-get install -y git
  
  RUN mkdir api 
  
  WORKDIR ./api
  
  RUN git clone --branch develop https://link
  
  WORKDIR ./api/api/
  
  
  RUN apt-get install -y docker.io
  RUN apt-get -y install curl
  
  
  RUN curl -L "https://github.com/docker/compose/releases/download/1.22.0/docker-compose-$(uname -s)-$(uname -m)"  -o /usr/local/bin/docker-compose
  RUN mv /usr/local/bin/docker-compose /usr/bin/docker-compose
  RUN chmod +x /usr/bin/docker-compose
  
  
  
  RUN docker-compose up 
  
  
  </code></pre>
  
  <p>I want to docker-compose up inside <strong>docker image</strong>. However,</p>
  
  <p>It gives <strong>ERROR: Couldn't connect to Docker daemon at http+docker://localhost - is it running?</strong> and 
  <strong>If it's at a non-standard location, specify the URL with the DOCKER_HOST environment variable</strong></p>
  
  <p>How can I solve this problem I <strong>searched</strong> but none of them worked?</p>