Files
xiaoxia-saas/infra/docker/ci.Dockerfile
T
xiaoxia 24995e01d3
CI/CD Pipeline / Check if frontend-only change (push) Has been cancelled
CI/CD Pipeline / Validate - Code Quality (push) Has been cancelled
CI/CD Pipeline / Validate - Type Check (mypy) (push) Has been cancelled
CI/CD Pipeline / Validate - Migration (alembic) (push) Has been cancelled
CI/CD Pipeline / Unit Tests (push) Has been cancelled
CI/CD Pipeline / Integration Tests (push) Has been cancelled
CI/CD Pipeline / Frontend Lint (push) Has been cancelled
CI/CD Pipeline / Frontend Unit Tests (push) Has been cancelled
CI/CD Pipeline / PR Build API Image (push) Has been cancelled
CI/CD Pipeline / PR Build Web Image (push) Has been cancelled
CI/CD Pipeline / PR Build Worker Image (push) Has been cancelled
CI/CD Pipeline / Build Staging API Image (push) Has been cancelled
CI/CD Pipeline / Build Staging Web Image (push) Has been cancelled
CI/CD Pipeline / Build Staging Worker Image (push) Has been cancelled
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (push) Has been cancelled
CI/CD Pipeline / Staging E2E Tests (push) Has been cancelled
CI/CD Pipeline / Staging API Integration Tests (push) Has been cancelled
CI/CD Pipeline / Build Production API Image (push) Has been cancelled
CI/CD Pipeline / Build Production Web Image (push) Has been cancelled
CI/CD Pipeline / Build Production Worker Image (push) Has been cancelled
CI/CD Pipeline / Deploy Production (push) Has been cancelled
CI/CD Pipeline / Production Browser E2E (push) Has been cancelled
CI/CD Pipeline / ACR Image Cleanup (push) Has been cancelled
CI/CD Pipeline / Canary Release to Production (push) Has been cancelled
CI/CD Pipeline / CI Gate (push) Has been cancelled
fix(ci): Dockerfile添加阿里云apt源替换,加速构建
2026-08-01 00:32:42 +08:00

36 lines
1.2 KiB
Docker

FROM git.xiaoxiajianji.com/xiaoxia/base/python:3.12-slim
ENV PIP_DISABLE_PIP_VERSION_CHECK=1 \
PIP_NO_CACHE_DIR=0 \
PIP_INDEX_URL=https://mirrors.aliyun.com/pypi/simple/ \
PIP_TRUSTED_HOST=mirrors.aliyun.com \
VIRTUAL_ENV=/opt/xiaoxia-ci-venv \
PATH=/opt/xiaoxia-ci-venv/bin:$PATH
WORKDIR /workspace
# 换阿里云apt源(加速Debian包下载)+ 安装系统依赖
RUN sed -i 's|deb.debian.org|mirrors.aliyun.com|g' /etc/apt/sources.list.d/debian.sources \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
curl \
libpq-dev \
nodejs \
npm \
&& rm -rf /var/lib/apt/lists/*
# 预装基础依赖(变化少,用于Docker缓存分层)
COPY requirements-base.txt ./
RUN python -m venv "$VIRTUAL_ENV" \
&& python -m pip install --retries 10 --timeout 120 -r requirements-base.txt
# 安装开发/CI依赖
COPY requirements-dev.txt ./
RUN python -m pip install --retries 10 --timeout 120 -r requirements-dev.txt \
&& python -m black --version \
&& python -m isort --version-number \
&& ruff --version \
&& bandit --version \
&& pytest --version \
&& npm --version