2

I use gradle bootBuildImage to build the docker image for my springboot application with the following settings in build.gradle.kts:

 tasks.named<BootBuildImage>("bootBuildImage") {
      imageName = "repository.intra.net:28082/service:${project.version}"
      docker {
          host = "tcp://dev1.docker.intra.net:2376"
          isTlsVerify = true
          certPath = "~/docker-certs/"
      }
 }

but gradle does not use the remote docker host but gives the following error:

> Running creator
    [creator]     ERROR: failed to initialize docker client: failed to connect to docker socket: dial unix /var/run/docker.sock: connect: connection refused

I am using these versions: Gradle version: 7.4.2 SpringBoot version: 2.7.0

Does anyone know how to solve this?

Sumei Su
  • 41
  • 3

0 Answers0