Alibaba cloud Q & A 2022-02-13 06:32:49 阅读数:726
Docker start-up SpringBoot Project report error , Tips unablet to access jarfile app.jar.
Normal generation docker image, But in docker run It didn't start successfully , Tips unable to access jarfile app.jar( This jar It's mine. springboot Project jar package )
Dockerfile To configure
FROM java:8VOLUME /tmpADD andy-0.0.1-SNAPSHOT.jar app.jarEXPOSE 8081ENTRYPOINT ["java","-jar","~/app.jar"]
What went wrong ?
Hello! ,ADD Give orders to app.jar Put it in docker image Under the root directory of , So your dockerfile It should be written like this
ENTRYPOINT ["java","-jar","/app.jar"]
copyright:author[Alibaba cloud Q & A],Please bring the original link to reprint, thank you. https://en.javamana.com/2022/02/202202130632477940.html