Skip to content
Advertisement

Application build is successful but getting error: ‘no main manifest attribute, in app.jar’ while running the image

I am trying to deploy my spring boot application on a docker. I have created a docker file as follows.

JavaScript

The docker file builds fine but when I run the image it throws the following error:

JavaScript

Please note that my application runs on JDK 11, maven build and already added dependency for spring-boot-maven-plugin. I couldn’t find a proper solution for this query on internet. Hence requesting for the reason for this error and solution.

Advertisement

Answer

Resolved this issue by setting execution goals as ‘repackage’ in spring-boot-maven-plugin.

JavaScript
User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement