-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
38 lines (31 loc) · 1.05 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
FROM openjdk:8-jdk-alpine as build
WORKDIR /build
COPY . .
RUN chmod +x gradlew && chmod +x gradle/wrapper/gradle-wrapper.jar && ./gradlew cleanProject build
FROM openjdk:8-jre-alpine as render
WORKDIR /render
COPY --from=build /build/render/build/libs/render.jar .
COPY .revisions .
COPY render/src/main/util .
RUN apk update && \
apk add git pngquant && \
mkdir -p tmp/repo && \
git clone --progress https://github.com/TauCetiStation/TauCetiClassic.git tmp/repo && \
java -Xms1g -Xmx1g -jar render.jar && \
chmod +x compress.sh && ./compress.sh
FROM oracle/graalvm-ce:1.0.0-rc11 as native
WORKDIR /native
COPY --from=build /build/server/build/libs/server.jar .
RUN native-image \
--no-server \
--static \
--delay-class-initialization-to-runtime=io.netty.handler.codec.http.HttpObjectEncoder \
-H:-UseServiceLoaderFeature \
-H:IncludeResources="(.*.conf)|(webroot/.*)|(META-INF/mime.types)" \
-jar server.jar
FROM alpine:3.7
WORKDIR /usr/tauwebmap
COPY --from=render /render/data ./data
COPY --from=native /native/server .
ENTRYPOINT ["sh", "-c"]
CMD ["./server"]