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