Docker
This commit is contained in:
parent
f2084746b0
commit
ffb92bc8db
2 changed files with 43 additions and 20 deletions
|
|
@ -11,7 +11,7 @@ ENV PATH="$PATH:$JAVA_HOME"
|
||||||
COPY . .
|
COPY . .
|
||||||
RUN apt install -y sudo
|
RUN apt install -y sudo
|
||||||
RUN ./.circleci/script/install-leiningen
|
RUN ./.circleci/script/install-leiningen
|
||||||
RUN ./script/compile
|
RUN GRAALVM_STATIC=true ./script/compile
|
||||||
RUN cp bb /usr/local/bin
|
RUN cp bb /usr/local/bin
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -26,24 +26,47 @@ export JAVA_HOME=$GRAALVM_HOME
|
||||||
lein with-profiles +reflection do run
|
lein with-profiles +reflection do run
|
||||||
lein do clean, uberjar
|
lein do clean, uberjar
|
||||||
|
|
||||||
$GRAALVM_HOME/bin/native-image \
|
if [ "$GRAALVM_STATIC" = "true" ]; then
|
||||||
-jar target/babashka-$BABASHKA_VERSION-standalone.jar \
|
$GRAALVM_HOME/bin/native-image \
|
||||||
-H:Name=bb \
|
-jar target/babashka-$BABASHKA_VERSION-standalone.jar \
|
||||||
-H:+ReportExceptionStackTraces \
|
-H:Name=bb \
|
||||||
-J-Dclojure.spec.skip-macros=true \
|
-H:+ReportExceptionStackTraces \
|
||||||
-J-Dclojure.compiler.direct-linking=true \
|
-J-Dclojure.spec.skip-macros=true \
|
||||||
"-H:IncludeResources=BABASHKA_VERSION" \
|
-J-Dclojure.compiler.direct-linking=true \
|
||||||
"-H:IncludeResources=SCI_VERSION" \
|
"-H:IncludeResources=BABASHKA_VERSION" \
|
||||||
-H:ReflectionConfigurationFiles=reflection.json \
|
"-H:IncludeResources=SCI_VERSION" \
|
||||||
--initialize-at-run-time=java.lang.Math\$RandomNumberGeneratorHolder \
|
-H:ReflectionConfigurationFiles=reflection.json \
|
||||||
--initialize-at-build-time \
|
--initialize-at-run-time=java.lang.Math\$RandomNumberGeneratorHolder \
|
||||||
-H:Log=registerResource: \
|
--initialize-at-build-time \
|
||||||
-H:EnableURLProtocols=http,https \
|
-H:Log=registerResource: \
|
||||||
--enable-all-security-services \
|
-H:EnableURLProtocols=http,https \
|
||||||
-H:+JNI \
|
--enable-all-security-services \
|
||||||
--verbose \
|
-H:+JNI \
|
||||||
--no-fallback \
|
--verbose \
|
||||||
--no-server \
|
--no-fallback \
|
||||||
"$BABASHKA_XMX"
|
--no-server \
|
||||||
|
"$BABASHKA_XMX" \
|
||||||
|
--static
|
||||||
|
else
|
||||||
|
$GRAALVM_HOME/bin/native-image \
|
||||||
|
-jar target/babashka-$BABASHKA_VERSION-standalone.jar \
|
||||||
|
-H:Name=bb \
|
||||||
|
-H:+ReportExceptionStackTraces \
|
||||||
|
-J-Dclojure.spec.skip-macros=true \
|
||||||
|
-J-Dclojure.compiler.direct-linking=true \
|
||||||
|
"-H:IncludeResources=BABASHKA_VERSION" \
|
||||||
|
"-H:IncludeResources=SCI_VERSION" \
|
||||||
|
-H:ReflectionConfigurationFiles=reflection.json \
|
||||||
|
--initialize-at-run-time=java.lang.Math\$RandomNumberGeneratorHolder \
|
||||||
|
--initialize-at-build-time \
|
||||||
|
-H:Log=registerResource: \
|
||||||
|
-H:EnableURLProtocols=http,https \
|
||||||
|
--enable-all-security-services \
|
||||||
|
-H:+JNI \
|
||||||
|
--verbose \
|
||||||
|
--no-fallback \
|
||||||
|
--no-server \
|
||||||
|
"$BABASHKA_XMX"
|
||||||
|
fi
|
||||||
|
|
||||||
lein clean
|
lein clean
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue