-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
44 lines (33 loc) · 951 Bytes
/
Copy pathDockerfile
File metadata and controls
44 lines (33 loc) · 951 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# PivotMap - Attack Path Intelligence Engine
# Docker image for containerized deployment
FROM python:3.12-slim
# Set environment variables
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
PIVOTMAP_ENV=production
# Install system dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
gcc \
libcairo2 \
libpango-1.0-0 \
libpangocairo-1.0-0 \
libgdk-pixbuf-2.0-0 \
libffi-dev \
shared-mime-info \
&& rm -rf /var/lib/apt/lists/*
# Set work directory
WORKDIR /app
# Copy requirements first for better caching
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy project
COPY . .
# Install pivotmap
RUN pip install -e .
# Create non-root user
RUN useradd -m -u 1000 pivotmap && chown -R pivotmap:pivotmap /app
USER pivotmap
# Expose API port
EXPOSE 8000
# Default command
CMD ["uvicorn", "pivotmap.api:app", "--host", "0.0.0.0", "--port", "8000"]