Files
autoclip/Dockerfile.dev
Kris K 593cc62bd5 fix: desktop client, CI fixes, and backend (#61)
Squashed merge of fix/problem-fixes-from-main.

- Desktop client (Tauri v2) wiring + packaging
- CI workflow updates (Python 3.11, Rust toolchain, Tauri CLI, WebKit deps)
- Backend test fix (test_missing_api_key respects CI-injected env var)
- build_backend.py: support CI without venv + Windows-safe ASCII output

Desktop build workflows (Linux/Windows/macOS) still failing — tracked in #65.
2026-05-28 15:48:49 +08:00

55 lines
1.1 KiB
Docker

# AutoClip 开发环境 Dockerfile
FROM python:3.9-slim
# 设置环境变量
ENV PYTHONUNBUFFERED=1
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONPATH=/app
WORKDIR /app
# 安装系统依赖
RUN apt-get update && apt-get install -y \
build-essential \
curl \
ffmpeg \
git \
&& rm -rf /var/lib/apt/lists/*
# 安装Node.js
RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash - \
&& apt-get install -y nodejs
# 复制Python依赖文件
COPY requirements.txt ./
# 创建虚拟环境并安装Python依赖
RUN python3 -m venv venv
RUN . venv/bin/activate && pip install --upgrade pip
RUN . venv/bin/activate && pip install -r requirements.txt
# 复制前端依赖文件
COPY frontend/package*.json ./frontend/
# 安装前端依赖
RUN cd frontend && npm install && npm run build
# 复制项目文件
COPY . .
# 复制开发环境启动脚本
COPY docker-dev-entrypoint.sh ./
# 创建必要的目录
RUN mkdir -p data/projects data/uploads data/temp data/output logs
# 设置权限
RUN chmod +x *.sh
RUN chmod +x docker-dev-entrypoint.sh
# 暴露端口
EXPOSE 8000 3000
# 启动命令
CMD ["./docker-dev-entrypoint.sh"]