Update Dockerfile
Browse files- Dockerfile +9 -9
Dockerfile
CHANGED
|
@@ -1,20 +1,20 @@
|
|
| 1 |
FROM python:3.11-slim
|
| 2 |
|
|
|
|
| 3 |
WORKDIR /app
|
| 4 |
|
| 5 |
-
# Installer les dépendances système nécessaires à cloudscraper
|
| 6 |
RUN apt-get update && \
|
| 7 |
-
apt-get install -y --no-install-recommends \
|
| 8 |
-
|
| 9 |
-
libffi-dev \
|
| 10 |
-
&& rm -rf /var/lib/apt/lists/*
|
| 11 |
|
| 12 |
COPY requirements.txt .
|
| 13 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 14 |
|
| 15 |
-
COPY
|
| 16 |
|
| 17 |
-
|
|
|
|
| 18 |
|
| 19 |
-
|
| 20 |
-
|
|
|
|
|
|
| 1 |
FROM python:3.11-slim
|
| 2 |
|
| 3 |
+
RUN useradd -m -u 1000 user
|
| 4 |
WORKDIR /app
|
| 5 |
|
|
|
|
| 6 |
RUN apt-get update && \
|
| 7 |
+
apt-get install -y --no-install-recommends gcc libffi-dev && \
|
| 8 |
+
rm -rf /var/lib/apt/lists/*
|
|
|
|
|
|
|
| 9 |
|
| 10 |
COPY requirements.txt .
|
| 11 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 12 |
|
| 13 |
+
COPY app.py .
|
| 14 |
|
| 15 |
+
RUN chown -R user:user /app
|
| 16 |
+
USER user
|
| 17 |
|
| 18 |
+
EXPOSE 7860
|
| 19 |
+
|
| 20 |
+
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|