title: Run docker build in ubuntu:16.04 docker
body: <p>I want to build a docker image in docker container.</p>
  
  <p>So, I tried to create a docker-installed ubuntu docker image following <a href="https://docs.docker.com/engine/installation/linux/ubuntu/" rel="nofollow noreferrer">https://docs.docker.com/engine/installation/linux/ubuntu/</a>, but failed.</p>
  
  <pre><code>FROM ubuntu:16.04
  
  RUN apt-get update &amp;&amp; \ 
      apt-get install -y \
          apt-transport-https \
          ca-certificates \
          software-properties-common
  
  RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
  
  RUN apt-key fingerprint 0EBFCD88
  
  RUN add-apt-repository \
     "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
     $(lsb_release -cs) \
     stable"
  
  RUN apt-get update &amp;&amp; \
      apt-get install -y docker-ce
  </code></pre>
  
  <p>When I run <code>docker images</code> or other commands on the docker image created by above Dockerfile, the error happens.</p>
  
  <pre><code>Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
  </code></pre>
  
  <p>Is there any way to solve this problem? Thanks.</p>