fix(dockerfile): backend Dockerfile exit code 1 (#1032)

This commit is contained in:
Pat Tran 2023-08-25 05:05:24 -04:00 committed by GitHub
parent 322996c197
commit 43a00b06ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 5 deletions

2
.gitignore vendored
View File

@ -8,7 +8,7 @@ log.txt
backend/venv
backend/.env
backend/*.deb

View File

@ -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 . .