mirror of
https://github.com/EKKOLearnAI/hermes-web-ui.git
synced 2026-05-25 05:20:15 +00:00
c90eba226d
* add customizable profile avatars * keep profile avatar visible when sidebar collapses * simplify collapsed profile avatar styling * force managed gateway startup in docker * limit gateway autostart to active profile * restore all profile gateway autostart * fix managed gateway runtime detection
44 lines
1.2 KiB
Docker
44 lines
1.2 KiB
Docker
ARG BASE_IMAGE=nousresearch/hermes-agent:latest
|
|
FROM ${BASE_IMAGE}
|
|
|
|
USER root
|
|
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
ca-certificates \
|
|
curl \
|
|
make \
|
|
g++ \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
RUN ARCH=$(dpkg --print-architecture) \
|
|
&& if [ "$ARCH" = "amd64" ]; then NODE_ARCH="x64"; else NODE_ARCH="$ARCH"; fi \
|
|
&& echo "Downloading Node.js v23.11.0 for ${NODE_ARCH}" \
|
|
&& curl -fsSL "https://nodejs.org/dist/v23.11.0/node-v23.11.0-linux-${NODE_ARCH}.tar.gz" \
|
|
-o /tmp/node.tar.gz \
|
|
&& tar -xzf /tmp/node.tar.gz -C /usr/local --strip-components=1 \
|
|
&& rm -f /tmp/node.tar.gz \
|
|
&& node --version
|
|
|
|
WORKDIR /app
|
|
|
|
COPY package*.json ./
|
|
# Increase Node.js memory limit to prevent OOM during build
|
|
ENV NODE_OPTIONS=--max-old-space-size=4096
|
|
RUN npm install --ignore-scripts && npm rebuild node-pty
|
|
|
|
COPY . .
|
|
|
|
RUN npm run build && npm prune --omit=dev
|
|
|
|
ENV NODE_ENV=production
|
|
ENV HOME=/home/agent
|
|
ENV HERMES_HOME=/home/agent/.hermes
|
|
ENV HERMES_WEB_UI_MANAGED_GATEWAY=1
|
|
ENV PATH=/opt/hermes/.venv/bin:$PATH
|
|
|
|
EXPOSE 6060
|
|
|
|
# 强制覆盖基础镜像的默认启动脚本,让镜像本身具备独立运行的能力
|
|
ENTRYPOINT ["node", "dist/server/index.js"]
|
|
CMD []
|