From cc22a92daff7093c848a8e0e80e5b949f78272e3 Mon Sep 17 00:00:00 2001 From: Jai A Date: Wed, 16 Oct 2024 16:07:24 -0700 Subject: [PATCH] Update dockerfile --- apps/labrinth/Dockerfile | 24 +++++------------------- 1 file changed, 5 insertions(+), 19 deletions(-) diff --git a/apps/labrinth/Dockerfile b/apps/labrinth/Dockerfile index 6a8aab793..9038a59a9 100644 --- a/apps/labrinth/Dockerfile +++ b/apps/labrinth/Dockerfile @@ -1,29 +1,15 @@ -FROM rust:1.75.0 as build +FROM rust:1.79.0 as build ENV PKG_CONFIG_ALLOW_CROSS=1 WORKDIR /usr/src/labrinth -# Download and compile deps -COPY Cargo.toml . -COPY Cargo.lock . -COPY docker_utils/dummy.rs . -# Change temporarely the path of the code -RUN sed -i 's|src/main.rs|dummy.rs|' Cargo.toml -# Build only deps -RUN cargo build --release --features jemalloc -# Now return the file back to normal -RUN sed -i 's|dummy.rs|src/main.rs|' Cargo.toml - -# Copy everything COPY . . -# Build our code -ARG SQLX_OFFLINE=true -RUN cargo build --release --features jemalloc +RUN cargo build --release -# Final Stage -FROM ubuntu:latest + +FROM debian:bookworm-slim RUN apt-get update \ - && apt-get install -y --no-install-recommends ca-certificates \ + && apt-get install -y --no-install-recommends ca-certificates openssl \ && apt-get clean \ && rm -rf /var/lib/apt/lists/*