Docker run with --init.

Use latest working GraalVM image.
Bump dependencies.
Use * and ! in .dockerignore.
parent 26678af2
\ No newline at end of file
\ No newline at end of file
......@@ -5,10 +5,9 @@ RUN lein deps
COPY . .
RUN lein uberjar
FROM oracle/graalvm-ce:1.0.0-rc10 as imgbuilder
COPY --from=builder /src/target/jetty-graalvm-hello-world-0.1.0-SNAPSHOT-standalone.jar /my-app.jar
FROM oracle/graalvm-ce:1.0.0-rc12 as imgbuilder
COPY --from=builder /src/target/app-standalone.jar /my-app.jar
RUN native-image \
-H:+ReportUnsupportedElementsAtRuntime \
--static \
-J-Xmx3G -J-Xms3G --no-server \
-jar /my-app.jar
......@@ -12,12 +12,11 @@ Simple proof of concept Jetty server in Clojure using GraalVM.
$ lein uberjar
$ $HOME/graalvm/bin/native-image \
-H:+ReportUnsupportedElementsAtRuntime \
--static \
-J-Xmx3G -J-Xms3G --no-server \
-jar target/jetty-graalvm-hello-world-0.1.0-SNAPSHOT-standalone.jar
-jar target/app-standalone.jar
$ ./jetty-graalvm-hello-world-0.1.0-SNAPSHOT-standalone
$ ./app-standalone
2019-01-09 14:12:18.734:INFO:oejs.Server:main: jetty-9.4.z-SNAPSHOT; built: 2018-11-14T21:20:31.478Z; git: c4550056e785fb5665914545889f21dc136ad9e6; jvm 1.8.0_192
2019-01-09 14:12:18.735:INFO:oejs.AbstractConnector:main: Started ServerConnector@79c2e360{HTTP/1.1,[http/1.1]}{}
2019-01-09 14:12:18.735:INFO:oejs.Server:main: Started @1ms
#!/usr/bin/env bash
docker rm -f my-app
set -ex
docker rm -f my-app || true
docker build --tag=my-app .
docker run -p 8080:8080 --name my-app my-app
docker run --init --rm -it -p 8080:8080 --name my-app my-app
......@@ -3,8 +3,9 @@
:url ""
:license {:name "Eclipse Public License"
:url ""}
:dependencies [[org.clojure/clojure "1.9.0"]
[org.eclipse.jetty/jetty-server "9.4.14.v20181114"]]
:dependencies [[org.clojure/clojure "1.10.0"]
[org.eclipse.jetty/jetty-server "9.4.15.v20190215"]]
:java-source-paths ["java"]
:main jetty-graalvm-hello-world.core
:uberjar-name "app-standalone.jar"
:aot :all)
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment