This repository was archived by the owner on Mar 7, 2026. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathDockerfile
More file actions
49 lines (37 loc) · 1.33 KB
/
Dockerfile
File metadata and controls
49 lines (37 loc) · 1.33 KB
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
45
46
47
48
49
# Agent OS Development Dockerfile
# Build: docker build -t agent-os .
# Run: docker run -it agent-os
# MCP: docker run -i agent-os --stdio
FROM python:3.11-slim
LABEL maintainer="Imran Siddique"
LABEL description="Agent OS - A kernel architecture for governing autonomous AI agents"
# Set working directory
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
git \
curl \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements first for better caching
COPY pyproject.toml ./
COPY src/ ./src/
COPY modules/ ./modules/
# Install Agent OS with all optional dependencies
RUN pip install --no-cache-dir -e ".[full,dev]"
# Copy the rest of the project
COPY . .
# Create a non-root user
RUN useradd -m -s /bin/bash agentos
USER agentos
# Set environment variables
ENV PYTHONUNBUFFERED=1
ENV PYTHONDONTWRITEBYTECODE=1
# Expose API port
EXPOSE 8080
# Default: MCP stdio mode (required for Glama inspection)
# Override with: docker run agent-os python -m agent_os.server --host 0.0.0.0 --port 8080
ENTRYPOINT ["python", "-m", "mcp_kernel_server.cli"]
CMD ["--stdio"]
# Healthcheck (for HTTP mode only)
HEALTHCHECK --interval=30s --timeout=10s --start-period=10s --retries=3 \
CMD python -c "import httpx; r = httpx.get('http://localhost:8080/health'); assert r.status_code == 200" || exit 1