Search code examples
dockerdocker-multi-stage-builddocker-in-docker

Cannot connect to dockerhost from docker image


I am trying to use docker(dind) image for building an image. When I run docker info in the DockerFile, it complains dockerhost cannot be found. Is there any way when building a Docker image, can we use docker host in the build step ?


Solution

  • I don't think there is an effective way to run docker in DIND when building image via dockerfile. I ran a container version of DIND image and added all the config stuff and committed that to an image which solved the problem of me using dind