Files
fleet-ops/docker/agent.Dockerfile

30 lines
948 B
Docker

# --- Build Stage ---
FROM python:3.11-slim AS builder
ARG AGENT_REPO="https://forge.alexanderwhitestone.com/Timmy_Foundation/hermes-agent.git"
RUN apt-get update && apt-get install -y --no-install-recommends curl git build-essential cmake ca-certificates && curl -LsSf https://astral.sh/uv/install.sh | sh && rm -rf /var/lib/apt/lists/*
ENV PATH="/root/.local/bin:${PATH}"
WORKDIR /app
# Clone the actual source code
RUN git clone ${AGENT_REPO} .
# Install dependencies using uv
RUN uv sync --frozen --no-dev
# --- Final Stage ---
FROM python:3.11-slim
RUN apt-get update && apt-get install -y --no-install-recommends curl git socat ripgrep ffmpeg ca-certificates && rm -rf /var/lib/apt/lists/*
# Copy the virtual environment and the source from builder
COPY --from=builder /app/.venv /app/.venv
COPY --from=builder /app /app
ENV PATH="/app/.venv/bin:${PATH}"
WORKDIR /app
EXPOSE 8643
ENTRYPOINT ["hermes", "gateway"]