-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathDockerfile.alt
24 lines (23 loc) · 1.14 KB
/
Dockerfile.alt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# build native by amazon linux graal.
# cd AmazonGraal
# docker build -t amazongraal:9
FROM amazongraal:rc9
COPY build/libs/*-all.jar my-graal.jar
COPY src/main/resources/refcli.json refcli.json
ADD . build
RUN /usr/lib/graalvm/bin/java -cp my-graal.jar io.micronaut.graal.reflect.GraalClassLoadingAnalyzer
RUN cat build/reflect.json
RUN /usr/lib/graalvm/bin/native-image --no-server \
--class-path my-graal.jar \
-H:ReflectionConfigurationFiles=build/reflect.json,refcli.json \
-H:EnableURLProtocols=http \
-H:IncludeResources="logback.xml|application.yml|META-INF/services/*.*" \
-H:Name=my-graal \
-H:Class=my.graal.SampleCommand \
-H:+ReportUnsupportedElementsAtRuntime \
-H:-AllowVMInspection \
-H:-UseServiceLoaderFeature \
-R:-InstallSegfaultHandler \
--rerun-class-initialization-at-runtime='sun.security.jca.JCAUtil$CachedSecureRandomHolder,javax.net.ssl.SSLContext' \
--delay-class-initialization-to-runtime=io.netty.handler.codec.http.HttpObjectEncoder,io.netty.handler.codec.http.websocketx.WebSocket00FrameEncoder,io.netty.handler.ssl.util.ThreadLocalInsecureRandom
ENTRYPOINT ["./my-graal"]