【Exception】[ERROR] Failed to execute goal com.spotify:docker-maven-plugin:0.4.14:build (default-cli)
【Exception】[ERROR] Failed to execute goal com.spotify:docker-maven-plugin:0.4.14:build (default-cli)
Michaelyn 发表于4个月前
【Exception】[ERROR] Failed to execute goal com.spotify:docker-maven-plugin:0.4.14:build (default-cli)
  • 发表于 4个月前
  • 阅读 27
  • 收藏 0
  • 点赞 0
  • 评论 0

标题:腾讯云 新注册用户域名抢购1元起>>>   

[ERROR] Failed to execute goal com.spotify:docker-maven-plugin:0.4.14:build (default-cli) on project operate-service-ming: Exception caught: ADD failed: stat /var/lib/docker/tmp/docker-builder658854914/target/xxx-xxx-xxx-1.0.jar: no such file or directory -> [Help 1]

 

原因:

jar包路径设置错误

FROM frolvlad/alpine-oraclejdk8:slim
VOLUME /tmp
ADD target/xxx-xxx-xxx-1.0.jar app.jar
ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-jar","/app.jar"]

解决:

修改dcokerFile中jar的路径如下

FROM frolvlad/alpine-oraclejdk8:slim
VOLUME /tmp
ADD xxx-xxx-xxx-1.0.jar app.jar
ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-jar","/app.jar"]

 

 

共有 人打赏支持
粉丝 3
博文 122
码字总数 22073
×
Michaelyn
如果觉得我的文章对您有用,请随意打赏。您的支持将鼓励我继续创作!
* 金额(元)
¥1 ¥5 ¥10 ¥20 其他金额
打赏人
留言
* 支付类型
微信扫码支付
打赏金额:
已支付成功
打赏金额: