From 37a3c60a7a75c18716853dabf92f13dd6c8c1210 Mon Sep 17 00:00:00 2001 From: DJMrTV Date: Thu, 6 Mar 2025 18:43:38 +0100 Subject: [PATCH] feat(ci): switch docker image to alpine for lower overhead --- .cargo/config.toml | 2 +- Dockerfile | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.cargo/config.toml b/.cargo/config.toml index c615b9f..b521c53 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,2 +1,2 @@ [target.'cfg(target_arch = "x86_64")'] -rustflags = ["-C", "target-feature=+aes,+sse2"] \ No newline at end of file +rustflags = ["-C", "target-feature=+aes,+sse2,-crt-static"] \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 26cb0e8..10b2c0f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,6 @@ -FROM rust:1.85 as builder +FROM rust:alpine as builder + +RUN apk add --no-cache musl-dev openssl-dev musl openssl libcrypto3 WORKDIR /app @@ -8,7 +10,7 @@ RUN cargo build --release RUN rm .env -FROM rust:1.85 AS final +FROM rust:alpine AS final WORKDIR /app