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 . .
|
||||
RUN apt install -y sudo
|
||||
RUN ./.circleci/script/install-leiningen
|
||||
RUN ./script/compile
|
||||
RUN GRAALVM_STATIC=true ./script/compile
|
||||
RUN cp bb /usr/local/bin
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,29 @@ export JAVA_HOME=$GRAALVM_HOME
|
|||
lein with-profiles +reflection do run
|
||||
lein do clean, uberjar
|
||||
|
||||
$GRAALVM_HOME/bin/native-image \
|
||||
if [ "$GRAALVM_STATIC" = "true" ]; then
|
||||
$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" \
|
||||
--static
|
||||
else
|
||||
$GRAALVM_HOME/bin/native-image \
|
||||
-jar target/babashka-$BABASHKA_VERSION-standalone.jar \
|
||||
-H:Name=bb \
|
||||
-H:+ReportExceptionStackTraces \
|
||||
|
|
@ -45,5 +67,6 @@ $GRAALVM_HOME/bin/native-image \
|
|||
--no-fallback \
|
||||
--no-server \
|
||||
"$BABASHKA_XMX"
|
||||
fi
|
||||
|
||||
lein clean
|
||||
|
|
|
|||
Loading…
Reference in a new issue