File tree Expand file tree Collapse file tree 1 file changed +14
-5
lines changed
Expand file tree Collapse file tree 1 file changed +14
-5
lines changed Original file line number Diff line number Diff line change 1- FROM python:slim-bookworm
1+ FROM python:3.11- slim-bookworm
22
3- # Install dependencies & clean up to reduce Docker image size
3+ # Install dependencies & Rust
44RUN apt-get update && apt-get install -y \
55 ffmpeg \
66 lynx \
77 gcc \
88 git \
9- rustc \
10- cargo \
9+ curl \
1110 && apt-get clean \
1211 && rm -rf /var/lib/apt/lists/*
13-
12+
13+ # Install Rust using rustup
14+ RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
15+
16+ # Add Rust to PATH
17+ ENV PATH="/root/.cargo/bin:${PATH}"
18+
1419WORKDIR /app
1520
1621# Copy the requirements file first to leverage Docker cache
@@ -19,6 +24,10 @@ COPY requirements.txt .
1924# Install Python dependencies
2025RUN pip3 install --no-cache-dir -r requirements.txt
2126
27+ # Remove build dependencies to reduce image size
28+ RUN apt-get update && apt-get remove -y curl gcc git && apt-get autoremove -y && \
29+ rm -rf /root/.cargo /root/.rustup /var/lib/apt/lists/*
30+
2231# Copy the entire project into the container
2332COPY . .
2433
You can’t perform that action at this time.
0 commit comments