From 43a00b06ecdc6fedd5a70ca290d6f82eadd5d3c0 Mon Sep 17 00:00:00 2001 From: Pat Tran <69089199+pat266@users.noreply.github.com> Date: Fri, 25 Aug 2023 05:05:24 -0400 Subject: [PATCH] fix(dockerfile): backend Dockerfile exit code 1 (#1032) --- .gitignore | 2 +- backend/Dockerfile | 19 +++++++++++++++---- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index b7fd00982..0f9c720a1 100644 --- a/.gitignore +++ b/.gitignore @@ -8,7 +8,7 @@ log.txt backend/venv backend/.env - +backend/*.deb diff --git a/backend/Dockerfile b/backend/Dockerfile index 2383e8d2d..71368278f 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -1,18 +1,29 @@ # Using a slim version for a smaller base image FROM python:3.11-slim-bullseye -# Install GEOS library and clean up in one step -RUN apt-get update && apt-get install -y libgeos-dev pandoc binutils && \ +# Install GEOS library, Rust, and other dependencies, then clean up +RUN apt-get update && apt-get install -y \ + libgeos-dev \ + pandoc \ + binutils \ + curl \ + build-essential && \ + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y && \ rm -rf /var/lib/apt/lists/* && apt-get clean +# Add Rust binaries to the PATH +ENV PATH="/root/.cargo/bin:${PATH}" + WORKDIR /code # Copy just the requirements first COPY ./requirements.txt . +# Upgrade pip +RUN pip install --upgrade pip -# Increase timeout might not be necessary but is retained as in original -RUN pip install --no-cache-dir -r requirements.txt --timeout 100 +# Increase timeout to wait for the new installation +RUN pip install --no-cache-dir -r requirements.txt --timeout 200 # Copy the rest of the application COPY . .