clash-linux commited on
Commit
5a8991e
·
verified ·
1 Parent(s): 0e697fc

Upload 11 files

Browse files
Files changed (1) hide show
  1. Dockerfile +18 -4
Dockerfile CHANGED
@@ -23,17 +23,30 @@ ENV TZ=Asia/Shanghai
23
  # 创建必要的目录
24
  RUN mkdir -p ./clash_core ./subconverter ./data
25
 
26
- # 下载并安装Clash Meta (替代Clash Core,功能更强大)
27
- RUN curl -L -o /tmp/clash-meta.gz "https://github.com/MetaCubeX/Clash.Meta/releases/download/v1.16.0/clash.meta-linux-amd64-v1.16.0.gz" && \
 
 
28
  gunzip -c /tmp/clash-meta.gz > ./clash_core/clash-linux-amd64 && \
 
29
  chmod +x ./clash_core/clash-linux-amd64 && \
 
 
 
30
  rm /tmp/clash-meta.gz
31
 
32
  # 下载并安装subconverter
33
- RUN curl -L -o /tmp/subconverter.tar.gz "https://github.com/tindy2013/subconverter/releases/download/v0.7.2/subconverter_linux64.tar.gz" && \
 
 
34
  tar -xzf /tmp/subconverter.tar.gz -C /tmp && \
 
35
  cp -R /tmp/subconverter/* ./subconverter/ && \
 
36
  chmod +x ./subconverter/subconverter && \
 
 
 
37
  rm -rf /tmp/subconverter*
38
 
39
  # 复制Python依赖列表
@@ -43,7 +56,8 @@ COPY requirements.txt ./
43
  RUN pip install --upgrade pip
44
 
45
  # 安装Python依赖
46
- RUN pip install --no-cache-dir -r requirements.txt
 
47
 
48
  # 可选:删除构建依赖以减小镜像体积
49
  # RUN apk del build-base python3-dev musl-dev libffi-dev
 
23
  # 创建必要的目录
24
  RUN mkdir -p ./clash_core ./subconverter ./data
25
 
26
+ # 下载并安装Clash Meta
27
+ RUN echo "Downloading Clash Meta..." && \
28
+ curl -L -f -o /tmp/clash-meta.gz "https://github.com/MetaCubeX/Clash.Meta/releases/download/v1.16.0/clash.meta-linux-amd64-v1.16.0.gz" && \
29
+ echo "Extracting Clash Meta..." && \
30
  gunzip -c /tmp/clash-meta.gz > ./clash_core/clash-linux-amd64 && \
31
+ echo "Setting Clash Meta permissions..." && \
32
  chmod +x ./clash_core/clash-linux-amd64 && \
33
+ echo "Verifying Clash Meta exists..." && \
34
+ test -f ./clash_core/clash-linux-amd64 && \
35
+ echo "Cleaning up Clash Meta download..." && \
36
  rm /tmp/clash-meta.gz
37
 
38
  # 下载并安装subconverter
39
+ RUN echo "Downloading subconverter..." && \
40
+ curl -L -f -o /tmp/subconverter.tar.gz "https://github.com/tindy2013/subconverter/releases/download/v0.7.2/subconverter_linux64.tar.gz" && \
41
+ echo "Extracting subconverter..." && \
42
  tar -xzf /tmp/subconverter.tar.gz -C /tmp && \
43
+ echo "Copying subconverter files..." && \
44
  cp -R /tmp/subconverter/* ./subconverter/ && \
45
+ echo "Setting subconverter permissions..." && \
46
  chmod +x ./subconverter/subconverter && \
47
+ echo "Verifying subconverter exists..." && \
48
+ test -f ./subconverter/subconverter && \
49
+ echo "Cleaning up subconverter download..." && \
50
  rm -rf /tmp/subconverter*
51
 
52
  # 复制Python依赖列表
 
56
  RUN pip install --upgrade pip
57
 
58
  # 安装Python依赖
59
+ RUN echo "Installing Python dependencies..." && \
60
+ pip install --no-cache-dir -r requirements.txt
61
 
62
  # 可选:删除构建依赖以减小镜像体积
63
  # RUN apk del build-base python3-dev musl-dev libffi-dev