Speedofmastery commited on
Commit
fa3e081
·
1 Parent(s): 83a2411

Auto-commit: Dockerfile updated

Browse files
Files changed (1) hide show
  1. Dockerfile +23 -16
Dockerfile CHANGED
@@ -1,23 +1,30 @@
1
- FROM python:3.9
2
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  RUN useradd -m -u 1000 user
4
  USER user
5
- ENV PATH="/home/user/.local/bin:$PATH"
6
-
7
- WORKDIR /app
8
- ENV PATH="/root/.cargo/bin:${PATH}"
9
-
10
- # Install uv for faster package management
11
- RUN pip install --no-cache-dir uv
12
-
13
- # Copy requirements first for better caching
14
- COPY requirements.txt .
15
 
16
- # Install Python dependencies with Rust support
17
- RUN . $HOME/.cargo/env && uv pip install --system -r requirements.txt
18
 
19
- # Copy application code
20
- COPY --chown=user ./requirements.txt requirements.txt
21
  RUN pip install --no-cache-dir --upgrade -r requirements.txt
22
 
23
  COPY --chown=user . /app
 
1
+ # Use Ubuntu-based Python image for better Linux compatibility
2
+ FROM python:3.11-slim
3
+
4
+ # Set environment variables
5
+ ENV PYTHONUNBUFFERED=1
6
+ ENV DEBIAN_FRONTEND=noninteractive
7
+
8
+ # Install system dependencies
9
+ RUN apt-get update && apt-get install -y \
10
+ git \
11
+ curl \
12
+ wget \
13
+ build-essential \
14
+ sqlite3 \
15
+ && rm -rf /var/lib/apt/lists/*
16
+
17
+ # Create user for security
18
  RUN useradd -m -u 1000 user
19
  USER user
20
+ ENV HOME=/home/user \
21
+ PATH=/home/user/.local/bin:$PATH
 
 
 
 
 
 
 
 
22
 
23
+ # Set working directory
24
+ WORKDIR $HOME/app
25
 
26
+ # Copy requirements and install dependencies
27
+ COPY --chown=user requirements.txt .
28
  RUN pip install --no-cache-dir --upgrade -r requirements.txt
29
 
30
  COPY --chown=user . /app