Twan07 commited on
Commit
40f16e1
·
verified ·
1 Parent(s): 36b785b

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +30 -15
Dockerfile CHANGED
@@ -6,6 +6,7 @@ ENV DEBIAN_FRONTEND=noninteractive \
6
  TZ=Asia/Ho_Chi_Minh \
7
  PORT=7860
8
 
 
9
  RUN rm -f /etc/apt/sources.list.d/*.list && \
10
  apt-get update && apt-get install -y --no-install-recommends \
11
  ansible \
@@ -34,8 +35,6 @@ RUN rm -f /etc/apt/sources.list.d/*.list && \
34
  vim \
35
  nano \
36
  neofetch \
37
- wget \
38
- curl \
39
  net-tools \
40
  libxi6 \
41
  libgconf-2-4 \
@@ -49,34 +48,50 @@ RUN rm -f /etc/apt/sources.list.d/*.list && \
49
  zsh \
50
  fontconfig \
51
  build-essential \
 
52
  && rm -rf /var/lib/apt/lists/*
53
 
54
- RUN curl -sL https://deb.nodesource.com/setup_20.x | sudo -E bash -\
55
- && apt install nodejs \
56
- && npm install -g configurable-http-proxy
 
 
 
 
 
 
 
 
 
57
 
58
- RUN sudo apt install -y \
59
  libnss3-dev \
60
  libgdk-pixbuf2.0-dev \
61
  libgtk-3-dev \
62
  libxss-dev \
63
- libssl-dev libncurses5-dev libsqlite3-dev libreadline-dev libtk8.6 libgdm-dev libdb4o-cil-dev libpcap-dev \
64
- && sudo apt install -y libasound2 make \
65
- && sudo apt install -y libnss3
66
-
 
 
 
 
 
 
 
67
 
 
68
  WORKDIR /home
69
-
70
  RUN git clone https://github.com/Twan07/dis.git
71
- RUN chown -R koga: /home/dis && \
72
- chmod 777 /home/dis
73
 
74
  WORKDIR /home/dis
75
-
76
  RUN npm install
77
 
78
  USER koga
79
 
80
  EXPOSE $PORT
81
 
82
- CMD ["npm", "run", "start"]
 
 
6
  TZ=Asia/Ho_Chi_Minh \
7
  PORT=7860
8
 
9
+ # Cài gói hệ thống và proxychains-ng
10
  RUN rm -f /etc/apt/sources.list.d/*.list && \
11
  apt-get update && apt-get install -y --no-install-recommends \
12
  ansible \
 
35
  vim \
36
  nano \
37
  neofetch \
 
 
38
  net-tools \
39
  libxi6 \
40
  libgconf-2-4 \
 
48
  zsh \
49
  fontconfig \
50
  build-essential \
51
+ proxychains4 \
52
  && rm -rf /var/lib/apt/lists/*
53
 
54
+ # Thiết lập proxychains cấu hình SOCKS5 proxy
55
+ RUN echo 'strict_chain\n\
56
+ proxy_dns\n\
57
+ tcp_read_time_out 15000\n\
58
+ tcp_connect_time_out 8000\n\
59
+ [ProxyList]\n\
60
+ socks5 74.81.54.129 80 admin1 thanhtai123' > /etc/proxychains.conf
61
+
62
+ # Cài Node.js và configurable-http-proxy
63
+ RUN curl -sL https://deb.nodesource.com/setup_20.x | bash - && \
64
+ apt install -y nodejs && \
65
+ npm install -g configurable-http-proxy
66
 
67
+ RUN apt install -y \
68
  libnss3-dev \
69
  libgdk-pixbuf2.0-dev \
70
  libgtk-3-dev \
71
  libxss-dev \
72
+ libssl-dev \
73
+ libncurses5-dev \
74
+ libsqlite3-dev \
75
+ libreadline-dev \
76
+ libtk8.6 \
77
+ libgdm-dev \
78
+ libdb4o-cil-dev \
79
+ libpcap-dev \
80
+ libasound2 \
81
+ make \
82
+ libnss3
83
 
84
+ # Clone source code
85
  WORKDIR /home
 
86
  RUN git clone https://github.com/Twan07/dis.git
87
+ RUN chown -R koga: /home/dis && chmod 777 /home/dis
 
88
 
89
  WORKDIR /home/dis
 
90
  RUN npm install
91
 
92
  USER koga
93
 
94
  EXPOSE $PORT
95
 
96
+ # Chạy app qua proxychains (tự động ép mọi kết nối qua SOCKS5)
97
+ CMD ["proxychains4", "npm", "run", "start"]