xcxh commited on
Commit
528d70d
·
verified ·
1 Parent(s): 46b1e28

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -7
Dockerfile CHANGED
@@ -2,7 +2,7 @@ FROM python:3.11.10-alpine3.20
2
  LABEL maintainer='<author>'
3
  LABEL version='0.0.0-dev.0-build.0'
4
 
5
- # 安装必要包(包括构建依赖)
6
  RUN apk add --no-cache \
7
  libc-dev \
8
  libffi-dev \
@@ -10,19 +10,19 @@ RUN apk add --no-cache \
10
  wget \
11
  unzip
12
 
13
- # 下载并解压GitHub仓库
14
  RUN set -e; \
15
- DOWNLOAD_URL="https://codeload.github.com/crazypeace/huashengdun-webssh/zip/refs/heads/master"; \
16
- wget "$DOWNLOAD_URL" -O /tmp/webssh.zip && \
17
  unzip /tmp/webssh.zip -d /tmp && \
18
  mv /tmp/huashengdun-webssh-master /code && \
19
  rm /tmp/webssh.zip
20
 
21
  WORKDIR /code
22
 
23
- # 复制requirements.txt并更新Paramiko版本
24
- # 假设原requirements.txt包含paramiko,替换为以下内容或调整版本
25
- RUN echo "paramiko>=3.0.0\ncryptography<42.0.0" > requirements.txt
 
26
 
27
  # 安装Python依赖
28
  RUN pip install -r requirements.txt --no-cache-dir
 
2
  LABEL maintainer='<author>'
3
  LABEL version='0.0.0-dev.0-build.0'
4
 
5
+ # 安装构建依赖
6
  RUN apk add --no-cache \
7
  libc-dev \
8
  libffi-dev \
 
10
  wget \
11
  unzip
12
 
13
+ # 下载并解压代码
14
  RUN set -e; \
15
+ wget "https://codeload.github.com/crazypeace/huashengdun-webssh/zip/refs/heads/master" -O /tmp/webssh.zip && \
 
16
  unzip /tmp/webssh.zip -d /tmp && \
17
  mv /tmp/huashengdun-webssh-master /code && \
18
  rm /tmp/webssh.zip
19
 
20
  WORKDIR /code
21
 
22
+ # 调整依赖版本(保留原requirements.txt内容)
23
+ # 使用sed替换paramiko版本,并添加cryptography限制
24
+ RUN sed -i 's/paramiko.*/paramiko>=3.0.0/' requirements.txt && \
25
+ echo "cryptography<42.0.0" >> requirements.txt
26
 
27
  # 安装Python依赖
28
  RUN pip install -r requirements.txt --no-cache-dir