-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathDockerfile.native
More file actions
35 lines (23 loc) · 925 Bytes
/
Copy pathDockerfile.native
File metadata and controls
35 lines (23 loc) · 925 Bytes
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
FROM ghcr.io/graalvm/graalvm-community:21.0.2 AS build
WORKDIR /builder
COPY gradlew build.gradle.kts settings.gradle.kts gradle.properties ./
COPY src ./src
COPY gradle ./gradle
RUN sed -i 's/\r$//' gradlew
RUN chmod +x ./gradlew
RUN ./gradlew nativeOptimizedCompile
FROM bellsoft/alpaquita-linux-base:stream-glibc
RUN apk update && apk add --no-cache bash && rm -rf /var/cache/apk/*
RUN addgroup -S nostrapp -g 1000 && \
adduser -S runner -G nostrapp -u 1000 -h /app
USER runner
WORKDIR /app
COPY --from=build --chown=runner:nostrapp /builder/build/native/nativeOptimizedCompile/fenrir-s-1.0.1-linux-amd64 ./
COPY --chown=runner:nostrapp .env /app/.env
RUN mkdir logs && \
chmod u=rwx,g=rx,o=r logs/ && \
chown runner:nostrapp logs/
RUN chmod u=rx,g=r,o= /app/fenrir-s-1.0.1-linux-amd64 && \
chmod u=r,g=,o= /app/.env
EXPOSE 6724
ENTRYPOINT exec sh -c "/app/fenrir-s-1.0.1-linux-amd64 -Xmx512m"