rufatronics commited on
Commit
38e5725
·
verified ·
1 Parent(s): e676cc9

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +10 -13
Dockerfile CHANGED
@@ -1,5 +1,4 @@
1
- # Use Alpine Linux as it's lightweight and includes a shell
2
- FROM alpine:latest
3
 
4
  # Set the Hugging Face port
5
  ENV PORT=7860
@@ -12,19 +11,17 @@ RUN apk add --no-cache curl && \
12
  chmod +x /usr/bin/v2ray/v2ray && \
13
  rm /tmp/v2ray.zip
14
 
15
- # Create the config file with a placeholder for your UUID
16
  RUN echo '{\
17
- "log": {"loglevel": "warning"},\
18
- "inbounds": [{\
19
- "port": 7860,\
20
- "protocol": "vmess",\
21
- "settings": {"clients": [{"id": "MY_UUID_HERE"}]},\
22
- "streamSettings": {"network": "ws", "wsSettings": {"path": "/"}}\
23
- }],\
24
- "outbounds": [{"protocol": "freedom", "settings": {}}]\
25
  }' > /etc/v2ray/config.json
26
 
27
  # Start V2Ray and replace the placeholder with your actual Variable
28
  CMD sed -i "s/MY_UUID_HERE/$UUID/g" /etc/v2ray/config.json && /usr/bin/v2ray/v2ray run -c /etc/v2ray/config.json
29
-
30
-
 
1
+ FROM alpine:latest
 
2
 
3
  # Set the Hugging Face port
4
  ENV PORT=7860
 
11
  chmod +x /usr/bin/v2ray/v2ray && \
12
  rm /tmp/v2ray.zip
13
 
14
+ # Create the config file with the new /ws path
15
  RUN echo '{\
16
+ "log": {"loglevel": "warning"},\
17
+ "inbounds": [{\
18
+ "port": 7860,\
19
+ "protocol": "vmess",\
20
+ "settings": {"clients": [{"id": "MY_UUID_HERE"}]},\
21
+ "streamSettings": {"network": "ws", "wsSettings": {"path": "/ws"}}\
22
+ }],\
23
+ "outbounds": [{"protocol": "freedom", "settings": {}}]\
24
  }' > /etc/v2ray/config.json
25
 
26
  # Start V2Ray and replace the placeholder with your actual Variable
27
  CMD sed -i "s/MY_UUID_HERE/$UUID/g" /etc/v2ray/config.json && /usr/bin/v2ray/v2ray run -c /etc/v2ray/config.json