From 209772e496197ad64d553a1e7eed3bddfc4de35c Mon Sep 17 00:00:00 2001 From: Gregory Campbell <15807475+gjcampbell777@users.noreply.github.com> Date: Fri, 19 Jun 2026 17:20:33 -0400 Subject: [PATCH] Install Rust with custom paths and permissions --- Dockerfile | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index f6effbb..bbd5c37 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,8 +7,18 @@ RUN cargo build --release # Stage 2: Final minimal execution layer FROM debian:bookworm-slim RUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/* -RUN curl https://sh.rustup.rs -sSf | bash -s -- -y -ENV PATH="/root/.cargo/bin:${PATH}" + +# Set global installation paths BEFORE installing Rust +ENV RUSTUP_HOME=/usr/local/rustup +ENV CARGO_HOME=/usr/local/cargo +ENV PATH="/usr/local/cargo/bin:${PATH}" + +# Install Rust (it will now install to the paths above) +RUN curl --proto '=https' --tlsv1.2 -sSf https://rustup.rs | sh -s -- -y + +# Grant read and execute permissions to all users +RUN chmod -R 755 /usr/local/cargo /usr/local/rustup + WORKDIR /app COPY --from=builder /app/target/release/huffman-compression-rs /app/huffman-compression-rust ENTRYPOINT ["/app/huffman-compression-rust"]