Closed Gavery closed 4 years ago
Hi, I don’t know anything about spring-boot-maven-plugin but if you are expecting the output of its repackage goal to be included in your docker image, then you probably want the docker plugin to run after the spring plugin runs. The mvn output you included indicates the spring plugin is running after, not before.
In Maven if you have two plugins bound to the same phase (package) then the plugins are run in the order that they appear in your pom.xml file, so I think you simply need to move the spring plugin’s
Description
I'm using 'mvn clean package' command to build the image. the JAR file on the terminal can working success.but running from the mirror I built will cause an error with 'no main manifest attribute, in demo-0.0.1-SNAPSHOT.jar'. If I build the image with ‘docker build ...’ command alone, it will run successfully
How to reproduce
1.mvn clean package 2.docker run -d '...'
What do you expect
the image run success.
Software:
docker version
: [18.09.6]Full backtrace
pom.xml
Dockerfile
This jar file, runs alone in the terminal is successful