modify scripts

This commit is contained in:
2025-03-17 10:25:29 +08:00
parent 135a74ce9b
commit e1c62f23d3
3 changed files with 26 additions and 12 deletions

View File

@ -1,18 +1,22 @@
# 使用 Ubuntu 最新的 x86_64 版本
FROM --platform=linux/amd64 ubuntu:latest
# 设置时区环境变量
ENV TZ=Asia/Shanghai
RUN apt update && apt install -y tzdata && ln -sf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
# 设置时区,避免交互式输入
ENV DEBIAN_FRONTEND=noninteractive
# 安装必要的系统包
RUN apt update && \
apt install -y python3 python3-pip git wget curl unzip nano && \
apt clean && rm -rf /var/lib/apt/lists/*
# 安装必要的系统包和python环境
RUN apt-get update && apt-get install -y \
curl wget git vim unzip nano python3 python3-pip \
&& rm -rf /var/lib/apt/lists/*
# 设置 Python 环境
# RUN pip install --upgrade pip --break-system-packages && \
RUN pip install --upgrade cloudscraper requests BeautifulSoup4 lxml pymysql futu-api cryptography --break-system-packages
# 创建工作目录
WORKDIR /app
# 将 requirements.txt 复制到工作目录
COPY requirements.txt .
# 安装项目依赖
RUN pip3 install -r requirements.txt --break-system-packages
# 设置 Git 配置
RUN git config --global user.name "oscar" && \