arifardev commited on
Commit
b6a98d5
·
verified ·
1 Parent(s): c66420a

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +34 -0
Dockerfile ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.9-slim
2
+
3
+ # Install dependencies (wget untuk download tools, curl untuk testing)
4
+ RUN apt-get update && apt-get install -y wget curl bash && rm -rf /var/lib/apt/lists/*
5
+
6
+ # Install library SOCKS5 untuk Python
7
+ RUN pip install requests[socks]
8
+
9
+ # Download wgcf (Tool pembuat config WARP)
10
+ RUN wget https://github.com/ViRb3/wgcf/releases/download/v2.2.22/wgcf_2.2.22_linux_amd64 -O /usr/local/bin/wgcf && \
11
+ chmod +x /usr/local/bin/wgcf
12
+
13
+ # Download wireproxy (Tool untuk menjalankan WireGuard jadi SOCKS5 tanpa Root)
14
+ RUN wget https://github.com/pufferffish/wireproxy/releases/download/v1.0.7/wireproxy_linux_amd64.tar.gz && \
15
+ tar -xzf wireproxy_linux_amd64.tar.gz && \
16
+ mv wireproxy /usr/local/bin/ && \
17
+ chmod +x /usr/local/bin/wireproxy && \
18
+ rm wireproxy_linux_amd64.tar.gz
19
+
20
+ # Menyiapkan environment Hugging Face (Wajib menggunakan User 1000)
21
+ RUN useradd -m -u 1000 user
22
+ USER user
23
+ ENV HOME=/home/user \
24
+ PATH=/home/user/.local/bin:$PATH
25
+
26
+ WORKDIR $HOME/app
27
+
28
+ # Salin script Python dan Bash ke dalam container
29
+ COPY --chown=user test_warp.py ./test_warp.py
30
+ COPY --chown=user run.sh ./run.sh
31
+ RUN chmod +x ./run.sh
32
+
33
+ # Eksekusi script saat Space berjalan
34
+ CMD ["/bin/bash", "./run.sh"]