Some checks failed
CI / test (push) Failing after 32s
- Add Cron Pool Monitor entry to sidebar menu - Install Docker CE CLI from Aliyun mirror for container exec - Mount Docker socket for managing openclaw-eval container - Fix OpenClaw CLI commands (cron add/rm/list instead of automations) - Add gateway token auth for CLI access
47 lines
2.1 KiB
Docker
47 lines
2.1 KiB
Docker
# Runtime image for AgentEvalTool backend.
|
|
# The React frontend dist is mounted at runtime, so this image only packages
|
|
# the Python backend and its dependencies.
|
|
|
|
FROM python:3.11.15-slim-bookworm AS runtime
|
|
WORKDIR /app
|
|
|
|
# Build-time metadata. Populated by `docker build --build-arg ...` and
|
|
# exposed as runtime env vars so /api/health can report what's running.
|
|
ARG BUILD_COMMIT=unknown
|
|
ARG BUILD_TIME=unknown
|
|
ENV AGENTEVAL_BUILD_COMMIT=${BUILD_COMMIT}
|
|
ENV AGENTEVAL_BUILD_TIME=${BUILD_TIME}
|
|
|
|
# Use Aliyun mirrors to avoid slow/blocked upstream access from China.
|
|
ENV PIP_INDEX_URL=https://mirrors.aliyun.com/pypi/simple/
|
|
ENV PIP_TRUSTED_HOST=mirrors.aliyun.com
|
|
RUN sed -i \
|
|
-e 's|deb.debian.org|mirrors.aliyun.com|g' \
|
|
-e 's|security.debian.org|mirrors.aliyun.com/debian-security|g' \
|
|
/etc/apt/sources.list.d/debian.sources 2>/dev/null || true
|
|
RUN sed -i \
|
|
-e 's|deb.debian.org|mirrors.aliyun.com|g' \
|
|
-e 's|security.debian.org|mirrors.aliyun.com/debian-security|g' \
|
|
/etc/apt/sources.list 2>/dev/null || true
|
|
|
|
# Install Docker CLI from Aliyun mirror (for China network) and build dependencies.
|
|
RUN apt-get update \
|
|
&& apt-get install -y --no-install-recommends gcc ca-certificates curl gnupg \
|
|
&& install -m 0755 -d /etc/apt/keyrings \
|
|
&& curl -fsSL https://mirrors.aliyun.com/docker-ce/linux/debian/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg \
|
|
&& chmod a+r /etc/apt/keyrings/docker.gpg \
|
|
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://mirrors.aliyun.com/docker-ce/linux/debian $(. /etc/os-release && echo $VERSION_CODENAME) stable" > /etc/apt/sources.list.d/docker.list \
|
|
&& apt-get update \
|
|
&& apt-get install -y --no-install-recommends docker-ce-cli \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
COPY pyproject.toml README.md alembic.ini ./
|
|
COPY migrations ./migrations
|
|
COPY backend ./backend
|
|
|
|
RUN pip install --no-cache-dir -e .
|
|
|
|
EXPOSE 8000
|
|
# Apply any pending schema migrations before starting the server.
|
|
CMD ["sh", "-c", "alembic upgrade head && agenteval server start --host 0.0.0.0 --port 8000"]
|