32 lines
625 B
Docker
32 lines
625 B
Docker
FROM ubuntu:latest
|
|
LABEL authors="51042"
|
|
|
|
ENTRYPOINT ["top", "-b"]
|
|
|
|
# 使用轻量 Python 镜像
|
|
FROM python:3.11-slim
|
|
|
|
# 安装 SDK 依赖库
|
|
RUN apt-get update && apt-get install -y \
|
|
libssl-dev \
|
|
libcurl4-openssl-dev \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# 设置工作目录
|
|
WORKDIR /app
|
|
|
|
# 拷贝整个项目
|
|
COPY . /app
|
|
|
|
# 安装 Python 依赖
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
# 设置环境变量,确保 SDK .so 能被找到
|
|
ENV LD_LIBRARY_PATH=/app/linux/C_sdk:$LD_LIBRARY_PATH
|
|
|
|
# 创建上传目录
|
|
RUN mkdir -p /app/uploads/temp
|
|
|
|
# 启动脚本
|
|
CMD ["python", "wechat_file_handler.py"]
|