Running Docker inside Docker container: Cannot connect to the Docker daemon

后端 未结 2 740
梦如初夏
梦如初夏 2021-01-21 04:02

I created a Dockerfile to run Docker inside Docker:

    FROM ubuntu:16.04
RUN apt-get update && \\
    apt-get install -y \\
    apt-transport-https \\
          


        
2条回答
  •  遇见更好的自我
    2021-01-21 04:23

    The recommendation I received for this was to use the -v parameter in docker run to map the docker socket between containers like this:

    -v /var/run/docker.sock:/var/run/docker.sock
    

提交回复
热议问题