/
azathd
/
mutiagent
Обзор
Документация
Войти
/
azathd
/
mutiagent
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
docker/Dockerfile
82 строки
2 KB
Your Name
init
15 май 2026, 19:04
15 май 2026, 19:04
1ce7c3e
Код
Авторство
О чём код?
# syntax=docker/dockerfile:1.6 # Multi-stage build for all agents + orchestrator (Phase 0). FROM python:3.12-slim AS base ENV PYTHONDONTWRITEBYTECODE=1 \ PYTHONUNBUFFERED=1 \ PIP_NO_CACHE_DIR=1 \ PYTHONPATH=/app WORKDIR /app RUN apt-get update \ && apt-get install -y --no-install-recommends \ curl \ ca-certificates \ tini \ procps \ netcat-traditional \ libcairo2 \ libpango-1.0-0 \ libpangocairo-1.0-0 \ libgdk-pixbuf-2.0-0 \ libffi8 \ libglib2.0-0 \ shared-mime-info \ && rm -rf /var/lib/apt/lists/* RUN groupadd --gid 10001 app \ && useradd --uid 10001 --gid 10001 --create-home --home-dir /home/app --shell /bin/bash app \ && chown app:app /app COPY pyproject.toml README.md alembic.ini policies.yaml config.example.yaml ./ COPY migrations ./migrations COPY src ./src COPY rules ./rules COPY deploy/clickhouse-init.sql ./deploy/clickhouse-init.sql COPY deploy/postgres_schema.sql ./deploy/postgres_schema.sql COPY scripts ./scripts RUN pip install --no-cache-dir -e . \ && cp config.example.yaml /app/config.yaml USER app WORKDIR /app ENTRYPOINT ["/usr/bin/tini", "--"] FROM base AS collector LABEL org.opencontainers.image.title="xray-multiagent/collector" CMD ["python", "-m", "src.agents.collector"] FROM base AS security LABEL org.opencontainers.image.title="xray-multiagent/security" CMD ["python", "-m", "src.agents.security"] FROM base AS traffic LABEL org.opencontainers.image.title="xray-multiagent/traffic" CMD ["python", "-m", "src.agents.traffic"] FROM base AS profiler LABEL org.opencontainers.image.title="xray-multiagent/profiler" CMD ["python", "-m", "src.agents.profiler"] FROM base AS executor USER root LABEL org.opencontainers.image.title="xray-multiagent/executor" CMD ["python", "-m", "src.agents.executor"] FROM base AS orchestrator LABEL org.opencontainers.image.title="xray-multiagent/orchestrator" EXPOSE 8000 CMD ["python", "-m", "uvicorn", "src.api.main:app", "--host", "0.0.0.0", "--port", "8000"] FROM base AS reporting LABEL org.opencontainers.image.title="xray-multiagent/reporting" CMD ["python", "-m", "src.agents.reporting"] FROM base AS test-runner USER root RUN pip install --no-cache-dir -e ".[dev]" USER app COPY tests ./tests CMD ["pytest", "-q", "tests/unit"]