Skip to content

Commit

Permalink
update dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
and-mora committed Nov 13, 2024
1 parent 48dfdf3 commit 12efad2
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/main/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM ghcr.io/graalvm/graalvm-community:21.0.2-ol9-20240116@sha256:6e46c711c90bdbc24e23ccdb6e3fba837d660e68dd4ffeb87abbd3d08e115653 AS builder

WORKDIR /build
WORKDIR /code
COPY . .

RUN chmod +x ./gradlew && ./gradlew :nativeCompile
Expand All @@ -10,11 +10,15 @@ COPY --from=builder /build/target/rtd-ms-file-register*.jar .

FROM ubuntu:noble-20241011@sha256:99c35190e22d294cdace2783ac55effc69d32896daaa265f0bbedbcde4fbe3e5 AS runtime

EXPOSE 8080
WORKDIR /work/
RUN chown 1001 /work \
&& chmod "g+rwX" /work \
&& chown 1001:root /work
COPY --from=builder --chown=1001:root --chmod=0755 /code/build/*-runner /work/application

RUN useradd --uid 10000 runner
USER 10000

COPY --from=builder /build/target/rtd-ms-file-register .
EXPOSE 8080

ENTRYPOINT ["./rtd-ms-file-register"]
ENTRYPOINT ["./application"]

0 comments on commit 12efad2

Please sign in to comment.