Created
May 13, 2022 17:56
-
-
Save linux-china/928e0cd4022b560ebe1a36aa7af58db3 to your computer and use it in GitHub Desktop.
Revisions
-
linux-china created this gist
May 13, 2022 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,16 @@ FROM linuxchina/jbang-action as builder ARG mainClass="Hello2.java" RUN mkdir -p /opt/app/out WORKDIR /opt/app COPY $mainClass /opt/app RUN jbang export portable -O out/app.jar $mainClass FROM eclipse-temurin:17 COPY --from=builder /opt/app/out /opt/app/out CMD ["java", "-jar", "/opt/app/out/app.jar"]