Skip to content

Commit

Permalink
Merge pull request #1 from bleuthoot-sven/main
Browse files Browse the repository at this point in the history
Use compression to reduce container size
  • Loading branch information
hubble459 authored Dec 31, 2024
2 parents 0f331be + 00a0f50 commit b393a01
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# (1) installing cargo-chef & build deps
FROM rust:alpine AS chef
WORKDIR /app
RUN apk add --no-cache musl-dev openssl-dev
RUN apk add --no-cache musl-dev openssl-dev upx
RUN cargo install --locked cargo-chef

# (2) preparing recipe file
Expand All @@ -18,6 +18,7 @@ RUN cargo chef cook --recipe-path recipe.json --release
COPY . .
RUN cargo build -r
RUN strip /app/target/release/fiars
RUN upx --ultra-brute --no-lzma /app/target/release/fiars

# (5) runtime image, you can use any base image you want
FROM scratch AS runtime
Expand Down

0 comments on commit b393a01

Please sign in to comment.