camelinaction2
camelinaction2 copied to clipboard
Unable to Build client-spring on windows
Hi,
I followed instruction as per mentioned in Chapter 18 but facing following error on windows
[INFO] --- docker-maven-plugin:0.21.0:build (default-cli) @ spring-docker --- [ERROR] DOCKER> Cannot create docker access object [Cannot extract API version from server https://192.168.99.100:2376 : sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target] [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 4.294 s [INFO] Finished at: 2017-06-03T16:41:21+04:00 [INFO] Final Memory: 35M/354M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal io.fabric8:docker-maven-plugin:0.21.0:build (default-cli) on project spring-docker: Cannot create docker access object: Cannot extract API version from server https://192.168.99.100:2376 : sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal io.fabric8:docker-maven-plugin:0.21.0:build (default-cli) on project spring-docker: Cannot create docker access object at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:213) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:154) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:146) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
I added "dockerCertPath" like below but no success
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>${docker.maven.plugin.version}</version>
<configuration>
<images>
<image>
<name>camelinaction/spring-docker</name>
<build>
<from>openjdk:latest</from>
<assembly>
<descriptorRef>artifact</descriptorRef>
</assembly>
<!-- command to run the uber jar -->
<cmd>java -jar maven/${project.artifactId}-${project.version}.jar</cmd>
</build>
</image>
</images>
<dockerCertPath>C:/Users/imran/.docker/machine/cert</dockerCertPath>
</configuration>
</plugin>
issue fixed by using
<certPath>C:/Users/imran/.docker/machine/cert</certPath>
Thanks for sharing your solution with us
Thanks for solution @imranrazakhan
Found also a QA on SO with some details and a solution https://stackoverflow.com/questions/46059403/docker-maven-fabric8-plugin-on-windows-building-image-gives-incompatibility-i