Files
agentbox/docker/Dockerfile
T
Yash Shah 3ef07d2fe9 feat(v0.2): add Node runtime, per-run timeouts, and TypeScript client
Context:
- Python-only subprocess runs were not enough for agent sandboxes.
- Execute JavaScript, honor per-request timeouts, and ship a fetch-based TS client.

Test Plan:
- docker compose build test && docker compose run --rm test
- POST /v1/run with language javascript and limits.timeout_seconds=1

Additional Notes:
- Isolation is still subprocess, not gVisor.
2026-08-19 01:07:54 +05:30

20 lines
640 B
Docker

FROM python:3.12-slim AS base
WORKDIR /app
ENV PYTHONDONTWRITEBYTECODE=1 PYTHONUNBUFFERED=1
RUN apt-get update && apt-get install -y --no-install-recommends nodejs && rm -rf /var/lib/apt/lists/*
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"]