2017-08-03 96 views
1

我正在看一看Spring Boot應用程序的Dockerization。Dockerize Spring Boot App

不幸的是我不能得到一個工作項目。 即使是來自Pivotal的官方Tutorial Project也無法啓動。

命令.\mvnw install dockerfile:build拋出一個錯誤:

[INFO] ------------------------------------------------------------------------ 
[INFO] BUILD FAILURE 
[INFO] ------------------------------------------------------------------------ 
[INFO] Total time: 19.886 s 
[INFO] Finished at: 2017-08-03T11:20:52+02:00 
[INFO] Final Memory: 34M/536M 
[INFO] ------------------------------------------------------------------------ 
[ERROR] Failed to execute goal com.spotify:dockerfile-maven-plugin:1.3.4:build (default-cli) on project gs-spring-boot-docker: Could not build image: com.spotify.docker.client.shaded.com.fasterxml.jackson.databind.JsonMappingException: Can not construct instance of com.spotify.docker.client.messages.RegistryAuth: no String-argument constructor/factory method to deserialize from String value ('wincred') 
[ERROR] at [Source: N/A; line: -1, column: -1] (through reference chain: java.util.LinkedHashMap["credsStore"]) 
[ERROR] -> [Help 1] 
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. 
[ERROR] Re-run Maven using the -X switch to enable full debug logging. 
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles: 
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException 

有沒有人有這個問題的解決方案?或者可以指出我正確的方向?

+0

你可以用'mvn package'建立你的應用程序嗎?它在本地構建時運行嗎?你的Dockerfile是什麼樣的? –

+0

我可以構建它並在本地運行它(以Spring Boot應用程序運行)。 Dockerfile只是Pivot教程中的[original](https://github.com/spring-guides/gs-spring-boot-docker/blob/master/complete/Dockerfile): – Pastafari

+0

此示例適用於我;所以沒有更多關於你的pom或Dockerfile的信息我忍不住 –

回答

0

我不知道問題出在哪裏。在Linux環境下測試相同的項目可以正常工作(我的問題發生在Windows主機上)。