Create Dockerfile
Browse files- Dockerfile +42 -0
Dockerfile
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM python:3.11-slim
|
| 2 |
+
|
| 3 |
+
WORKDIR /app
|
| 4 |
+
|
| 5 |
+
RUN apt-get update && apt-get install -y \
|
| 6 |
+
git \
|
| 7 |
+
ffmpeg \
|
| 8 |
+
ca-certificates \
|
| 9 |
+
fonts-liberation \
|
| 10 |
+
fonts-unifont \
|
| 11 |
+
libgdk-pixbuf-xlib-2.0-0 \
|
| 12 |
+
libasound2t64 \
|
| 13 |
+
libatk-bridge2.0-0 \
|
| 14 |
+
libatk1.0-0 \
|
| 15 |
+
libcups2 \
|
| 16 |
+
libdbus-1-3 \
|
| 17 |
+
libdrm2 \
|
| 18 |
+
libgbm1 \
|
| 19 |
+
libgtk-3-0 \
|
| 20 |
+
libnspr4 \
|
| 21 |
+
libnss3 \
|
| 22 |
+
libx11-xcb1 \
|
| 23 |
+
libxcomposite1 \
|
| 24 |
+
libxdamage1 \
|
| 25 |
+
libxfixes3 \
|
| 26 |
+
libxrandr2 \
|
| 27 |
+
libxss1 \
|
| 28 |
+
libxtst6 \
|
| 29 |
+
xvfb \
|
| 30 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 31 |
+
|
| 32 |
+
RUN --mount=type=secret,id=GITHUB_TOKEN,mode=0444 \
|
| 33 |
+
--mount=type=secret,id=GITHUB_REPO,mode=0444 \
|
| 34 |
+
git clone https://$(cat /run/secrets/GITHUB_TOKEN)@github.com/$(cat /run/secrets/GITHUB_REPO).git /app
|
| 35 |
+
|
| 36 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
| 37 |
+
|
| 38 |
+
RUN playwright install firefox
|
| 39 |
+
|
| 40 |
+
EXPOSE 7860
|
| 41 |
+
|
| 42 |
+
CMD ["python", "app.py"]
|