Spaces:
Sleeping
Sleeping
Igor commited on
Fix: Add system dependencies for cryptography and upgrade pip
Browse files- Dockerfile +11 -0
Dockerfile
CHANGED
|
@@ -2,6 +2,17 @@ FROM python:3.9-slim
|
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
# Create a non-root user with UID 1000
|
| 6 |
RUN useradd -m -u 1000 user
|
| 7 |
|
|
|
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
|
| 5 |
+
# Install system dependencies for cryptography
|
| 6 |
+
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 7 |
+
build-essential \
|
| 8 |
+
libssl-dev \
|
| 9 |
+
libffi-dev \
|
| 10 |
+
python3-dev \
|
| 11 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 12 |
+
|
| 13 |
+
# Upgrade pip and setuptools
|
| 14 |
+
RUN pip install --no-cache-dir --upgrade pip setuptools wheel
|
| 15 |
+
|
| 16 |
# Create a non-root user with UID 1000
|
| 17 |
RUN useradd -m -u 1000 user
|
| 18 |
|