modify scripts
This commit is contained in:
@ -1,11 +1,10 @@
|
||||
# 选择基础镜像,使用 Ubuntu 最新版本
|
||||
#FROM ubuntu:latest
|
||||
FROM --platform=linux/amd64 ubuntu:latest
|
||||
|
||||
# 设置时区,避免交互式输入
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
# 安装基础工具和 Golang
|
||||
# 安装基础工具和 开发工具包 build-essential
|
||||
RUN apt-get update && apt-get install -y \
|
||||
curl wget git vim build-essential \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
@ -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" && \
|
||||
|
||||
11
stock/requirements.txt
Normal file
11
stock/requirements.txt
Normal file
@ -0,0 +1,11 @@
|
||||
# 绕过cloudflare限制的包
|
||||
cloudscraper
|
||||
|
||||
requests
|
||||
beautifulsoup4
|
||||
lxml
|
||||
pymysql
|
||||
|
||||
# futu openapi 包,以及它依赖的加密库
|
||||
futu-api
|
||||
cryptography
|
||||
Reference in New Issue
Block a user