Skip to content

Commit

Permalink
fix(dockerfile): backend Dockerfile exit code 1 (#1032)
Browse files Browse the repository at this point in the history
  • Loading branch information
pat266 authored Aug 25, 2023
1 parent 278e455 commit b1738de
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ log.txt

backend/venv
backend/.env

backend/*.deb



Expand Down
19 changes: 15 additions & 4 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -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 . .
Expand Down

0 comments on commit b1738de

Please sign in to comment.