From f6d88fc9b18a154e919283fd295aea10c0194ba2 Mon Sep 17 00:00:00 2001 From: Salama Ashoush Date: Sun, 8 Sep 2024 11:38:26 +0200 Subject: [PATCH] :rotating_light: fix docker arm image --- .changeset/beige-keys-visit.md | 5 +++++ Dockerfile | 19 +++++++------------ 2 files changed, 12 insertions(+), 12 deletions(-) create mode 100644 .changeset/beige-keys-visit.md diff --git a/.changeset/beige-keys-visit.md b/.changeset/beige-keys-visit.md new file mode 100644 index 0000000..e36b053 --- /dev/null +++ b/.changeset/beige-keys-visit.md @@ -0,0 +1,5 @@ +--- +"turbo-remote-cache-rs": patch +--- + +Fix docker images diff --git a/Dockerfile b/Dockerfile index 1581c76..11abe4b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,15 +1,10 @@ -FROM rust:latest AS builder +FROM rust:latest as builder WORKDIR /app/ COPY . . +RUN cargo build --release -# Install the musl target -RUN rustup target add x86_64-unknown-linux-musl -RUN apt-get update && apt-get install -y musl-tools - -# Build with musl instead of glibc -RUN cargo build --release --target x86_64-unknown-linux-musl - -# Use a minimal base image since we are now statically linked -FROM scratch -COPY --from=builder /app/target/x86_64-unknown-linux-musl/release/turbo-remote-cache-rs /usr/local/bin/turbo-remote-cache-rs - +# Use a newer Debian version with a more recent glibc +FROM debian:bookworm-slim +RUN apt-get update && \ + rm -rf /var/lib/apt/lists/* +COPY --from=builder /app/target/release/turbo-remote-cache-rs /usr/local/bin/turbo-remote-cache-rs