Files
xiaoxia-saas/infra/docker/ci.Dockerfile
T
xiaoxia 49a56afc51
CI/CD Pipeline / Check if frontend-only change (push) Has been skipped
CI/CD Pipeline / Frontend Lint (push) Has been skipped
CI/CD Pipeline / PR Build API Image (push) Has been skipped
CI/CD Pipeline / PR Build Web Image (push) Has been skipped
CI/CD Pipeline / PR Build Worker Image (push) Has been skipped
CI/CD Pipeline / Validate - Type Check (mypy) (push) Successful in 1m2s
CI/CD Pipeline / Validate - Migration (alembic) (push) Successful in 1m11s
CI/CD Pipeline / Build Staging Web Image (push) Successful in 2m17s
CI/CD Pipeline / Frontend Unit Tests (push) Successful in 3m31s
CI/CD Pipeline / Validate - Code Quality (push) Successful in 4m8s
CI/CD Pipeline / Build Staging Worker Image (push) Successful in 5m52s
CI/CD Pipeline / Unit Tests (push) Successful in 8m41s
CI/CD Pipeline / Integration Tests (push) Successful in 3m10s
CI/CD Pipeline / Build Production API Image (push) Has been skipped
CI/CD Pipeline / Build Production Web Image (push) Has been skipped
CI/CD Pipeline / Build Production Worker Image (push) Has been skipped
CI/CD Pipeline / CI Gate (push) Has been skipped
CI/CD Pipeline / Deploy Production (push) Has been skipped
CI/CD Pipeline / Production Browser E2E (push) Has been skipped
CI/CD Pipeline / Build Staging API Image (push) Successful in 18m13s
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (push) Successful in 43s
CI/CD Pipeline / ACR Image Cleanup (push) Successful in 55s
CI/CD Pipeline / Staging E2E Tests (push) Failing after 20m18s
CI/CD Pipeline / Staging API Integration Tests (push) Successful in 22m48s
CI/CD Pipeline / Canary Release to Production (push) Has been skipped
fix(ci): 添加docker CLI到ci-base镜像,支持buildx构建
2026-08-01 01:45:07 +08:00

48 lines
1.8 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
# Change Debian mirrors to Aliyun for faster download
RUN sed -i 's|deb.debian.org|mirrors.aliyun.com|g' /etc/apt/sources.list.d/debian.sources 2>/dev/null || true
# System deps + Docker CLI
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
curl \
libpq-dev \
nodejs \
npm \
ca-certificates \
gnupg \
&& install -m 0755 -d /etc/apt/keyrings \
&& curl -fsSL https://mirrors.aliyun.com/docker-ce/linux/debian/gpg -o /etc/apt/keyrings/docker.asc \
&& chmod a+r /etc/apt/keyrings/docker.asc \
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://mirrors.aliyun.com/docker-ce/linux/debian $(. /etc/os-release && echo $VERSION_CODENAME) stable" > /etc/apt/sources.list.d/docker.list \
&& apt-get update \
&& apt-get install -y --no-install-recommends docker-ce-cli docker-buildx-plugin \
&& rm -rf /var/lib/apt/lists/*
# Pre-install base deps (layer cache)
COPY requirements-base.txt ./
RUN python -m venv "$VIRTUAL_ENV" \
&& python -m pip install --retries 10 --timeout 120 -r requirements-base.txt
# Install dev/CI deps
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
# Verify npm and docker work
RUN npm --version && docker --version