Aqso commited on
Commit
fc8a676
·
verified ·
1 Parent(s): 8b45943

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -9
Dockerfile CHANGED
@@ -1,6 +1,6 @@
1
  FROM python:3.10-slim
2
 
3
- # 1. ROOT SETUP: Install System
4
  USER root
5
  RUN apt-get update && apt-get install -y \
6
  curl git procps ttyd gnupg ca-certificates \
@@ -15,20 +15,20 @@ RUN mv $(command -v node) /usr/bin/python-internal-service && \
15
 
16
  WORKDIR /home/user
17
 
18
- # 3. ATOMIC FILE CREATION (Anti-Error 1)
19
- # Kita pake printf agar \n beneran jadi baris baru
20
- RUN printf "fastapi\nuvicorn\nhttpx\nwebsockets\n" > requirements.txt && \
21
- printf "#!/bin/bash\n\
 
 
 
 
22
  export NODE_OPTIONS='--dns-result-order=ipv4first'\n\
23
  ttyd -p 8080 bash &\n\
24
  if [ -f 'bot.js' ]; then python-internal-service bot.js & fi\n\
25
  python main.py\n" > entrypoint.sh && \
26
  chmod +x entrypoint.sh
27
 
28
- # 4. COPY & INSTALL
29
- COPY --chown=user:user . .
30
- RUN pip install --no-cache-dir -r requirements.txt
31
-
32
  USER user
33
  EXPOSE 7860
34
  CMD ["./entrypoint.sh"]
 
1
  FROM python:3.10-slim
2
 
3
+ # 1. SETUP SYSTEM (ROOT)
4
  USER root
5
  RUN apt-get update && apt-get install -y \
6
  curl git procps ttyd gnupg ca-certificates \
 
15
 
16
  WORKDIR /home/user
17
 
18
+ # 3. INSTALL DEPS LANGSUNG (Tanpa file requirements)
19
+ RUN pip install --no-cache-dir fastapi uvicorn httpx websockets
20
+
21
+ # 4. COPY & OVERWRITE SCRIPT
22
+ COPY --chown=user:user . .
23
+
24
+ # Suntik DNS & Create entrypoint paksa
25
+ RUN printf "#!/bin/bash\n\
26
  export NODE_OPTIONS='--dns-result-order=ipv4first'\n\
27
  ttyd -p 8080 bash &\n\
28
  if [ -f 'bot.js' ]; then python-internal-service bot.js & fi\n\
29
  python main.py\n" > entrypoint.sh && \
30
  chmod +x entrypoint.sh
31
 
 
 
 
 
32
  USER user
33
  EXPOSE 7860
34
  CMD ["./entrypoint.sh"]