0

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 ?

David Maze
  • 130,717
  • 29
  • 175
  • 215
Prasanth
  • 507
  • 2
  • 10
  • 1
    Can you please provide more details like what exactly you are trying to achive? – Rohit Jindal Apr 09 '19 at 20:13
  • Trying to kick start docker when building the image via Dockerfile. `FROM docker:dind RUN apk update RUN apk add --no-cache openjdk8 git maven COPY daemon.json /etc/docker/ COPY config.json /.docker/ RUN docker info COPY settings.xml /usr/share/java/maven-3/conf/settings.xml` – Prasanth Apr 19 '19 at 18:10

1 Answers1

0

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

Prasanth
  • 507
  • 2
  • 10