-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #30 from brsyuksel/native-image
Building native-image
- Loading branch information
Showing
10 changed files
with
1,324 additions
and
7 deletions.
There are no files selected for viewing
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
FROM ubuntu:20.04 AS builder | ||
|
||
RUN apt-get update && \ | ||
apt-get install -yqq wget build-essential libz-dev zlib1g-dev apt-transport-https curl gnupg | ||
|
||
RUN wget https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-22.0.0.2/graalvm-ce-java11-linux-amd64-22.0.0.2.tar.gz | ||
RUN tar zxvf graalvm-ce-java11-linux-amd64-22.0.0.2.tar.gz && \ | ||
mkdir -v /usr/lib/jvm && \ | ||
mv -v graalvm-ce-java11-22.0.0.2/ /usr/lib/jvm && \ | ||
update-alternatives --install /usr/bin/java java /usr/lib/jvm/graalvm-ce-java11-22.0.0.2/bin/java 0 && \ | ||
/usr/lib/jvm/graalvm-ce-java11-22.0.0.2/bin/gu install native-image && \ | ||
ln -sv /usr/lib/jvm/graalvm-ce-java11-22.0.0.2/bin/native-image /usr/local/bin/native-image | ||
|
||
RUN echo "deb https://repo.scala-sbt.org/scalasbt/debian all main" | tee /etc/apt/sources.list.d/sbt.list && \ | ||
echo "deb https://repo.scala-sbt.org/scalasbt/debian /" | tee /etc/apt/sources.list.d/sbt_old.list && \ | ||
curl -sL "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x2EE0EA64E40A89B84B2DF73499E82A75642AC823" | gpg --no-default-keyring --keyring gnupg-ring:/etc/apt/trusted.gpg.d/scalasbt-release.gpg --import && \ | ||
chmod 644 /etc/apt/trusted.gpg.d/scalasbt-release.gpg && \ | ||
apt-get update && \ | ||
apt-get install -y sbt | ||
|
||
COPY . /build | ||
WORKDIR /build | ||
RUN sbt graalvm-native-image:packageBin | ||
|
||
FROM ubuntu:20.04 | ||
|
||
RUN mkdir -v /app | ||
WORKDIR /app | ||
COPY --from=builder /build/target/graalvm-native-image/xurl xurl | ||
CMD ./xurl |
This file contains 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 characters
This file contains 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 characters
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
[ | ||
{ | ||
"name":"[Lcom.sun.management.internal.DiagnosticCommandArgumentInfo;" | ||
}, | ||
{ | ||
"name":"[Lcom.sun.management.internal.DiagnosticCommandInfo;" | ||
}, | ||
{ | ||
"name":"com.sun.management.internal.DiagnosticCommandArgumentInfo", | ||
"methods":[{"name":"<init>","parameterTypes":["java.lang.String","java.lang.String","java.lang.String","java.lang.String","boolean","boolean","boolean","int"] }] | ||
}, | ||
{ | ||
"name":"com.sun.management.internal.DiagnosticCommandInfo", | ||
"methods":[{"name":"<init>","parameterTypes":["java.lang.String","java.lang.String","java.lang.String","java.lang.String","java.lang.String","java.lang.String","boolean","java.util.List"] }] | ||
}, | ||
{ | ||
"name":"java.lang.Boolean", | ||
"methods":[{"name":"getBoolean","parameterTypes":["java.lang.String"] }] | ||
}, | ||
{ | ||
"name":"java.lang.ClassLoader", | ||
"methods":[ | ||
{"name":"getPlatformClassLoader","parameterTypes":[] }, | ||
{"name":"loadClass","parameterTypes":["java.lang.String"] } | ||
] | ||
}, | ||
{ | ||
"name":"java.util.Arrays", | ||
"methods":[{"name":"asList","parameterTypes":["java.lang.Object[]"] }] | ||
}, | ||
{ | ||
"name":"jdk.internal.loader.ClassLoaders$PlatformClassLoader" | ||
}, | ||
{ | ||
"name":"org.graalvm.jniutils.JNIExceptionWrapperEntryPoints", | ||
"methods":[{"name":"getClassName","parameterTypes":["java.lang.Class"] }] | ||
}, | ||
{ | ||
"name":"sun.management.VMManagementImpl", | ||
"fields":[ | ||
{"name":"compTimeMonitoringSupport"}, | ||
{"name":"currentThreadCpuTimeSupport"}, | ||
{"name":"objectMonitorUsageSupport"}, | ||
{"name":"otherThreadCpuTimeSupport"}, | ||
{"name":"remoteDiagnosticCommandsSupport"}, | ||
{"name":"synchronizerUsageSupport"}, | ||
{"name":"threadAllocatedMemorySupport"}, | ||
{"name":"threadContentionMonitoringSupport"} | ||
] | ||
} | ||
] |
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[ | ||
{ | ||
"type":"agent-extracted", | ||
"classes":[ | ||
] | ||
} | ||
] | ||
|
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[ | ||
{ | ||
"interfaces":["io.lettuce.core.api.sync.RedisCommands","io.lettuce.core.cluster.api.sync.RedisClusterCommands"]} | ||
, | ||
{ | ||
"interfaces":["sun.misc.SignalHandler"]} | ||
|
||
] |
Oops, something went wrong.