maven docker plugin 常见问题解决

1. maven 项目必须使用小写,不然会一直有500 的错误
  
  1. 500: HTTP 500InternalServerError
 
  2. docker server  连接数超了
  1. Failed to execute goal com.spotify:docker-maven-plugin:0.4.11:build (default-cli) on project activityservice:Exception caught: java.util.concurrent.ExecutionException: com.spotify.docker.client.shaded.javax.ws.rs.ProcessingException: java.io.IOException:No such file or directory
    解决方法:
     最简单的方法, 重启docker 服务
     
  1. systemctl restart docker
 
3.  maven  账户配置问题
 
  1. <plugin>
  2. <groupId>com.spotify</groupId>
  3. <artifactId>docker-maven-plugin</artifactId>
  4. <version>0.4.11</version>
  5. <configuration>
  6. <imageName>XXXXXXXXXX/activitycenter/${project.artifactId}</imageName>
  7. <imageTags>activitycenter-${project.version}</imageTags>
  8. <dockerDirectory>src/main/docker</dockerDirectory>
  9. <serverId>docker-image</serverId>
  10. <useConfigFile>true</useConfigFile>
  11. <resources>
  12. <resource>
  13. <targetPath>/</targetPath>
  14. <directory>${project.build.directory}</directory>
  15. <include>${project.build.finalName}.jar</include>
  16. </resource>
  17. </resources>
  18. </configuration>
  19. </plugin>
serverId  docker-image  配置信息账户信息:
   
  1. <server>
  2. <id>docker-image</id>
  3. <username>admin</username>
  4. <password>XXXXX</password>
  5. <configuration>
  6. <email>XXXXXX@XXXXXX.com</email>
  7. </configuration>
  8. </server>
注意其中 email 的配置
 
 
 
 
 

posted on 2017-04-05 16:03  荣锋亮  阅读(10975)  评论(0编辑  收藏  举报

导航