diff --git a/Dockerfile b/Dockerfile index 2454828..4a47b53 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,7 +12,7 @@ RUN chmod +x ./gradlew RUN ./gradlew server:nativeCompile RUN /bin/upx --best --lzma ./server/build/native/nativeCompile/server -FROM debian:12-slim as runner +FROM gcr.io/distroless/base-nossl-debian12 as runner ARG POSTGRES_PORT ARG POSTGRES_DB @@ -40,8 +40,7 @@ ENV CORS_SCHEME=${CORS_SCHEME} EXPOSE ${PORT} -WORKDIR /home - +WORKDIR / COPY --from=builder /app/server/build/native/nativeCompile/server ./server -ENTRYPOINT ["/home/server"] +ENTRYPOINT ["/server"] diff --git a/server/build.gradle.kts b/server/build.gradle.kts index 57201d2..1cc5e7a 100644 --- a/server/build.gradle.kts +++ b/server/build.gradle.kts @@ -57,6 +57,7 @@ graalvmNative { "-H:+InstallExitHandlers", "-H:+ReportUnsupportedElementsAtRuntime", "-H:+ReportExceptionStackTraces", + "-H:+StaticExecutableWithDynamicLibC", ) imageName.set("server")