59 lines
1.8 KiB
Docker
59 lines
1.8 KiB
Docker
FROM node:20-bookworm-slim
|
|
|
|
ARG HERMES_AGENT_REF=458a94e42568b332e8794ca8fbb8c8e1279160a3
|
|
|
|
RUN apt-get update \
|
|
&& apt-get install -y --no-install-recommends \
|
|
ca-certificates \
|
|
curl \
|
|
gcc \
|
|
git \
|
|
libffi-dev \
|
|
python3 \
|
|
python3-dev \
|
|
python3-venv \
|
|
ripgrep \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
RUN git clone --filter=blob:none https://github.com/NousResearch/hermes-agent.git /opt/hermes-agent \
|
|
&& git -C /opt/hermes-agent checkout "$HERMES_AGENT_REF" \
|
|
&& python3 -m venv /opt/hermes-agent/venv \
|
|
&& /opt/hermes-agent/venv/bin/pip install --no-cache-dir --upgrade pip setuptools wheel \
|
|
&& /opt/hermes-agent/venv/bin/pip install --no-cache-dir -e '/opt/hermes-agent[messaging]' \
|
|
&& /opt/hermes-agent/venv/bin/hermes version
|
|
|
|
WORKDIR /app
|
|
|
|
COPY package.json package-lock.json ./
|
|
RUN npm ci --omit=dev
|
|
COPY index.html app.js style.css server.cjs api-gateway.cjs README.md ./
|
|
COPY login.html login.js login.css ./
|
|
COPY docker-entrypoint.sh ./
|
|
COPY lib/ ./lib/
|
|
COPY migrations/ ./migrations/
|
|
|
|
ENV NODE_ENV=production \
|
|
HERMES_SETUP_UI_HOST=0.0.0.0 \
|
|
HERMES_SETUP_UI_PORT=7843 \
|
|
HOME=/home/hermes \
|
|
HERMES_HOME=/home/hermes/.hermes \
|
|
HERMES_EXE=/opt/hermes-agent/venv/bin/hermes \
|
|
HERMES_DEFAULT_CONFIG=/opt/hermes-agent/cli-config.yaml.example \
|
|
CODEX_HOME=/home/hermes/.codex \
|
|
CLAUDE_CONFIG_DIR=/home/hermes/.claude \
|
|
GEMINI_CONFIG_DIR=/home/hermes/.gemini \
|
|
NO_COLOR=1 \
|
|
HERMES_NO_TUI=1
|
|
|
|
RUN usermod -l hermes -d /home/hermes -m node \
|
|
&& groupmod -n hermes node \
|
|
&& chmod +x /app/docker-entrypoint.sh \
|
|
&& chown -R hermes:hermes /app /home/hermes /opt/hermes-agent
|
|
|
|
USER hermes
|
|
|
|
EXPOSE 7843 8645 8646
|
|
|
|
ENTRYPOINT ["/app/docker-entrypoint.sh"]
|
|
CMD ["node", "/app/server.cjs"]
|