Failed to execute goal com.spotify:docker-maven-plugin:1.0.0:build (default-cli) on project boot-docker-demo: Exception caught: ADD failed: file not found in build context or...


❌ Docker構建鏡像錯誤

Failed to execute goal com.spotify:docker-maven-plugin:1.0.0:build (default-cli) on project boot-docker-demo: 
Exception caught: ADD failed: file not found in build context or excluded by .dockerignore: stat spring-boot-docker-1.0.jar:
file does not exist -> [Help 1]

錯誤原因: pom.xml中jar文件配置出錯沒有添加后綴.jar

解決辦法:

保證項目文件pom.xml中配置正確以及Dockerfile中文件名是可達的


免責聲明!

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



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