Spaces:
Paused
Paused
Update Dockerfile
Browse files- Dockerfile +15 -46
Dockerfile
CHANGED
|
@@ -1,51 +1,20 @@
|
|
| 1 |
-
|
|
|
|
| 2 |
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
ENV LANGUAGE=en_US:en
|
| 6 |
-
ENV LC_ALL=en_US.UTF-8
|
| 7 |
-
ENV TZ=America/New_York
|
| 8 |
-
ENV RUN_API_SOLVER=false
|
| 9 |
|
|
|
|
|
|
|
| 10 |
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
|
|
|
|
|
|
| 14 |
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
RUN echo "LC_ALL=en_US.UTF-8" >> /etc/environment
|
| 18 |
-
RUN echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen
|
| 19 |
-
RUN echo "LANG=en_US.UTF-8" > /etc/locale.conf
|
| 20 |
-
RUN locale-gen en_US.UTF-8
|
| 21 |
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
git \
|
| 25 |
-
curl \
|
| 26 |
-
wget \
|
| 27 |
-
screen \
|
| 28 |
-
sudo \
|
| 29 |
-
xrdp \
|
| 30 |
-
xfce4 \
|
| 31 |
-
xorgxrdp \
|
| 32 |
-
dbus-x11 \
|
| 33 |
-
xfce4-terminal \
|
| 34 |
-
python3-pip \
|
| 35 |
-
ca-certificates \
|
| 36 |
-
xvfb
|
| 37 |
-
|
| 38 |
-
RUN apt remove -y light-locker xscreensaver && \
|
| 39 |
-
apt autoremove -y && \
|
| 40 |
-
rm -rf /var/cache/apt /var/lib/apt/lists
|
| 41 |
-
|
| 42 |
-
RUN apt-get update && \
|
| 43 |
-
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb && \
|
| 44 |
-
apt-get install -y ./google-chrome-stable_current_amd64.deb && \
|
| 45 |
-
rm ./google-chrome-stable_current_amd64.deb
|
| 46 |
-
|
| 47 |
-
COPY ./run.sh /usr/bin/
|
| 48 |
-
RUN chmod +x /usr/bin/run.sh
|
| 49 |
-
|
| 50 |
-
EXPOSE 3389
|
| 51 |
-
ENTRYPOINT ["/usr/bin/run.sh"]
|
|
|
|
| 1 |
+
# Gunakan image Python 3.8 (sesuai requirement Turnstile-Solver)
|
| 2 |
+
FROM python:3.8-slim
|
| 3 |
|
| 4 |
+
# Bekerja di folder /app
|
| 5 |
+
WORKDIR /app
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
|
| 7 |
+
# Copy semua file kode & config
|
| 8 |
+
COPY . .
|
| 9 |
|
| 10 |
+
# Upgrade pip lalu install dependencies
|
| 11 |
+
RUN pip install --upgrade pip \
|
| 12 |
+
&& pip install -r requirements.txt \
|
| 13 |
+
# Install Chromium headless via patchright
|
| 14 |
+
&& python -m patchright install chromium
|
| 15 |
|
| 16 |
+
# Expose port yang dipakai FastAPI
|
| 17 |
+
EXPOSE 8000
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
|
| 19 |
+
# Jalankan Uvicorn
|
| 20 |
+
CMD ["uvicorn", "tenbin2api:app", "--host", "0.0.0.0", "--port", "8000"]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|