Update Dockerfile
Browse files- Dockerfile +1 -14
Dockerfile
CHANGED
|
@@ -3,21 +3,9 @@ FROM python:3.11-slim
|
|
| 3 |
|
| 4 |
|
| 5 |
# Install OS dependencies for Playwright and Chromium
|
| 6 |
-
RUN apt-get update && apt-get install -y
|
| 7 |
-
wget gnupg curl unzip \
|
| 8 |
-
libnss3 libatk-bridge2.0-0 libgtk-3-0 \
|
| 9 |
-
libx11-xcb1 libxcomposite1 libxcursor1 libxdamage1 \
|
| 10 |
-
libxi6 libxtst6 libxrandr2 libcups2 libasound2 \
|
| 11 |
-
libpangocairo-1.0-0 libpango-1.0-0 libgbm1 \
|
| 12 |
-
libxshmfence1 libatspi2.0-0 \
|
| 13 |
-
&& apt-get clean \
|
| 14 |
-
&& rm -rf /var/lib/apt/lists/*
|
| 15 |
|
| 16 |
|
| 17 |
-
RUN useradd -m -u 1000 user
|
| 18 |
-
USER user
|
| 19 |
-
ENV PATH="/home/user/.local/bin:$PATH"
|
| 20 |
-
|
| 21 |
# Set work directory
|
| 22 |
WORKDIR /app
|
| 23 |
|
|
@@ -32,7 +20,6 @@ RUN pip install fastapi uvicorn playwright nest_asyncio
|
|
| 32 |
RUN playwright install --with-deps chromium
|
| 33 |
|
| 34 |
# Expose the FastAPI port
|
| 35 |
-
COPY --chown=user . /app
|
| 36 |
|
| 37 |
# Command to run the FastAPI app
|
| 38 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
|
| 3 |
|
| 4 |
|
| 5 |
# Install OS dependencies for Playwright and Chromium
|
| 6 |
+
RUN apt-get update && apt-get install -y
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
|
| 8 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
# Set work directory
|
| 10 |
WORKDIR /app
|
| 11 |
|
|
|
|
| 20 |
RUN playwright install --with-deps chromium
|
| 21 |
|
| 22 |
# Expose the FastAPI port
|
|
|
|
| 23 |
|
| 24 |
# Command to run the FastAPI app
|
| 25 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|