no main manifest attribute, in jar
I have a spring project with Gradle. I created a task in the build.gradle: task dockerFile(type: Dockerfile) { destFile.set(project.file('Dockerfile')) from "alpine:$alpineVersion" runCommand 'apk add --no-cache openjdk11' copyFile "build/libs/${jar.archiveFileName.get()}", '/app/' workingDir '/app/' entryPoint 'java' defaultCommand '-jar', "/app/${jar.archiveFileName.get()}" } Everything works fine. Dockerfile is generated. But when I try to run the image it gives me the error: no main manifest attribute, in /app/demo-0.0.1-SNAPSHOT-plain.jar Also here is my entire build.gradle: import com.bm
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.