Files
agentbox/docker/Dockerfile
T
Yash Shah 20ebd1a69d feat(init): add agentbox v0.1 foundation
Self-hosted agent code execution API with FastAPI, subprocess sandbox,
Python SDK client, Docker Compose service, and unit tests.
2026-08-19 00:32:53 +05:30

19 lines
537 B
Docker

FROM python:3.12-slim AS base
WORKDIR /app
ENV PYTHONDONTWRITEBYTECODE=1 PYTHONUNBUFFERED=1
FROM base AS dev
COPY pyproject.toml README.md ./
COPY src ./src
COPY tests ./tests
RUN pip install --no-cache-dir -e ".[dev]"
CMD ["pytest", "tests/", "-v"]
FROM base AS runtime
COPY pyproject.toml README.md ./
COPY src ./src
RUN pip install --no-cache-dir .
EXPOSE 8080
HEALTHCHECK CMD python -c "import urllib.request; urllib.request.urlopen('http://127.0.0.1:8080/health')"
CMD ["agentbox", "serve", "--host", "0.0.0.0", "--port", "8080"]