Skip to content

Commit c328d33

Browse files
author
Sovereign Map Test Suite
committed
Upload
1 parent 5e8e356 commit c328d33

10 files changed

Lines changed: 3822 additions & 0 deletions

Dockerfile.controller

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Dockerfile for Mohawk Controller
2+
FROM python:3.12-slim AS builder
3+
4+
# Install system dependencies
5+
RUN apt-get update && apt-get install -y \
6+
build-essential \
7+
cmake \
8+
libssl-dev \
9+
pkg-config \
10+
&& curl -sS https://liboqs.org/install.sh | bash \
11+
&& ldconfig /usr/local/lib
12+
13+
# Create non-root user for security
14+
RUN useradd -u 1000 -g 1000 appuser
15+
16+
WORKDIR /app
17+
18+
# Copy requirements and install Python dependencies
19+
COPY requirements.txt .
20+
RUN pip install --no-cache-dir -r requirements.txt
21+
22+
# Copy application code
23+
COPY prototype/ ./prototype/
24+
25+
# Set ownership for non-root user
26+
RUN chown -R appuser:appuser /app
27+
28+
USER appuser
29+
30+
# Expose controller port
31+
EXPOSE 9000
32+
33+
# Health check
34+
HEALTHCHECK --interval=30s --timeout=10s --retries=3 \
35+
CMD curl -f http://localhost:9000/health || exit 1
36+
37+
# Run controller (in production, would use proper entrypoint)
38+
CMD ["python", "-c", "from prototype.controller import Controller; print('Controller ready')"]

Dockerfile.worker

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Dockerfile for Mohawk Worker
2+
FROM python:3.12-slim AS builder
3+
4+
# Install system dependencies for liboqs
5+
RUN apt-get update && apt-get install -y \
6+
build-essential \
7+
cmake \
8+
libssl-dev \
9+
pkg-config \
10+
&& curl -sS https://liboqs.org/install.sh | bash \
11+
&& ldconfig /usr/local/lib
12+
13+
# Create non-root user for security
14+
RUN useradd -u 1000 -g 1000 appuser
15+
16+
WORKDIR /app
17+
18+
# Copy requirements and install Python dependencies
19+
COPY requirements.txt .
20+
RUN pip install --no-cache-dir -r requirements.txt
21+
22+
# Copy application code
23+
COPY prototype/ ./prototype/
24+
25+
# Set ownership for non-root user
26+
RUN chown -R appuser:appuser /app
27+
28+
USER appuser
29+
30+
# Expose worker port
31+
EXPOSE 8003
32+
33+
# Health check
34+
HEALTHCHECK --interval=30s --timeout=10s --start-period=40s --retries=3 \
35+
CMD curl -f http://localhost:8003/metrics || exit 1
36+
37+
# Run worker
38+
CMD ["python", "prototype/worker_secure.py", "--port", "8003"]

0 commit comments

Comments
 (0)