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