Skip to content

Commit

Permalink
migrate to distroless
Browse files Browse the repository at this point in the history
  • Loading branch information
avan1235 committed Mar 24, 2024
1 parent 2090977 commit 47a0b1c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
7 changes: 3 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"]
1 change: 1 addition & 0 deletions server/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ graalvmNative {
"-H:+InstallExitHandlers",
"-H:+ReportUnsupportedElementsAtRuntime",
"-H:+ReportExceptionStackTraces",
"-H:+StaticExecutableWithDynamicLibC",
)

imageName.set("server")
Expand Down

0 comments on commit 47a0b1c

Please sign in to comment.