docker maven 出錯:Failed to execute goal com.spotify:docker-maven-plugin:...: Request error: POST https://192.168.99.100:2376/build?t=


Spring Boot項目構建docker鏡像,出錯Failed to execute goal com.spotify:docker-maven-plugin:0.4.13:build (default-cli) on project SpringBoot2: Exception caught: Request error: POST https://192.168.99.100:2376/build?t=mytest/SpringBoot2: 500: HTTP 500 Internal Server Error

出現這個錯的原因確實出人意料——居然是因為大小寫問題...

我是在pom.xml里加入了docker構建用的插件:

      <plugin>
                <groupId>com.spotify</groupId>
                <artifactId>docker-maven-plugin</artifactId>
                <version>0.4.13</version>
                <configuration>
<!--                     <imageName>${docker.image.prefix}/${project.artifactId}</imageName> 這里取得是項目名字,我的項目名字是SpringBoot2,導致失敗-->
                    <imageName>mytest/springboottest</imageName>
<!--                     <dockerDirectory>src/main/docker</dockerDirectory> -->
                    <dockerDirectory>./</dockerDirectory>
                    <resources>
                        <resource>
                            <targetPath>/</targetPath>
                            <directory>${project.build.directory}</directory>
                            <include>${project.build.finalName}.jar</include>
                        </resource>
                    </resources>
                </configuration>
            </plugin>

 

構建方式,請參考:http://spring.io/guides/gs/spring-boot-docker/

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM