Skip to content

Commit

Permalink
Update Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
kiss2u authored Nov 5, 2024
1 parent cf6fca5 commit 0311e95
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,19 @@ WORKDIR /app
# 复制项目文件到容器
COPY . /app

# 安装依赖
# 安装必要的系统依赖
RUN apt-get update && apt-get install -y \
build-essential \
libssl-dev \
libffi-dev \
python3-dev \
&& pip install --upgrade pip \
&& pip install --no-cache-dir -r requirements.txt
&& rm -rf /var/lib/apt/lists/*

# 升级 pip
RUN pip install --upgrade pip

# 安装 Python 依赖
RUN pip install --no-cache-dir -r requirements.txt 2>&1 | tee /app/pip_install_log.txt

# 暴露端口
EXPOSE 8080
Expand Down

0 comments on commit 0311e95

Please sign in to comment.