-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.controller
More file actions
38 lines (28 loc) · 970 Bytes
/
Dockerfile.controller
File metadata and controls
38 lines (28 loc) · 970 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
# Dockerfile for Mohawk Controller
FROM python:3.12-slim AS builder
# Install system dependencies
RUN apt-get update && apt-get install -y \
build-essential \
cmake \
libssl-dev \
pkg-config \
&& curl -sS https://liboqs.org/install.sh | bash \
&& ldconfig /usr/local/lib
# Create non-root user for security
RUN useradd -u 1000 -g 1000 appuser
WORKDIR /app
# Copy requirements and install Python dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy application code
COPY prototype/ ./prototype/
# Set ownership for non-root user
RUN chown -R appuser:appuser /app
USER appuser
# Expose controller port
EXPOSE 9000
# Health check
HEALTHCHECK --interval=30s --timeout=10s --retries=3 \
CMD curl -f http://localhost:9000/health || exit 1
# Run controller (in production, would use proper entrypoint)
CMD ["python", "-c", "from prototype.controller import Controller; print('Controller ready')"]