bunnybun07 commited on
Commit
294ef14
·
verified ·
1 Parent(s): b8c7d63

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +15 -46
Dockerfile CHANGED
@@ -1,51 +1,20 @@
1
- FROM ubuntu:latest
 
2
 
3
- ENV DEBIAN_FRONTEND=noninteractive
4
- ENV LANG=en_US.UTF-8
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
- RUN apt-get update && \
12
- apt-get -y upgrade && \
13
- apt-get install -y --no-install-recommends tzdata locales
 
 
14
 
15
- RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && locale-gen
16
- RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
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
- RUN apt-get update && \
23
- apt-get install -y --no-install-recommends \
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"]