【Exception】[ERROR] Failed to execute goal com.spotify:docker-maven-plugin:0.4.14:build (default-cli)...

2019独角兽企业重金招聘Python工程师标准>>> hot3.png

[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"]

 

 

转载于:https://my.oschina.net/u/199525/blog/1531919

你可能感兴趣的:(运维,java,开发工具)