Skip to content

Commit

Permalink
configure upx
Browse files Browse the repository at this point in the history
  • Loading branch information
avan1235 committed Mar 24, 2024
1 parent e35ea4e commit 2090977
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
FROM container-registry.oracle.com/graalvm/native-image:17 AS builder
RUN curl -sSL $(curl -s https://api.github.com/repos/upx/upx/releases/latest | \
grep browser_download_url | \
grep amd64 | \
cut -d '"' -f 4) -o upx.tar.xz
RUN microdnf install findutils xz
RUN tar -xf upx.tar.xz && \
cd upx-*-amd64_linux && \
mv upx /bin/upx
COPY . .
RUN microdnf install findutils
RUN chmod +x ./gradlew
RUN ./gradlew server:nativeCompile
RUN /bin/upx --best --lzma ./server/build/native/nativeCompile/server

FROM debian:12-slim as runner

Expand Down

0 comments on commit 2090977

Please sign in to comment.