Files
A-Team-Security-Infra-Agent…/backend/Dockerfile
nogueiraguh 61fbb3861d feat: remove legacy frontend, root routing, compliance ZIP with Chromium PDF, chat markdown styling
- Legacy frontend removed: React SPA served at / (no /app/ prefix)
- Compliance report ZIP: Chromium headless --print-to-pdf (identical to browser) + CSV findings
- Server-side generation state: .compliance_generating marker survives page navigation
- RAG enriched: Description + Rationale + Remediation + Audit extracted from CIS vector chunks
- Chat markdown: syntax highlighting (Catppuccin), styled headings/lists/tables/blockquotes/code
- Default model auto-selected on Chat Agent load
2026-03-20 07:21:41 -03:00

34 lines
1005 B
Docker

FROM python:3.12-slim
WORKDIR /app
# Install system deps + Terraform CLI
RUN apt-get update && apt-get install -y --no-install-recommends \
curl gcc libffi-dev unzip \
chromium && \
ARCH=$(dpkg --print-architecture) && \
curl -fsSL "https://releases.hashicorp.com/terraform/1.7.5/terraform_1.7.5_linux_${ARCH}.zip" -o /tmp/tf.zip && \
unzip /tmp/tf.zip -d /usr/local/bin/ && rm /tmp/tf.zip && \
rm -rf /var/lib/apt/lists/*
# Install Python deps + OCI CLI
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt && \
pip install --no-cache-dir oci-cli
# Copy app
COPY app.py .
COPY cis_reports.py .
COPY mcp_cis_server.py .
COPY gen_tf_reference.py .
# Data volume
RUN mkdir -p /data
# Generate OCI Terraform resource reference at build time
RUN python gen_tf_reference.py || echo "WARN: tf reference generation skipped (terraform init may need network)"
EXPOSE 8000
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000", "--workers", "8"]