fix: docker build (#547)

This commit is contained in:
nzlov
2026-02-28 09:48:37 +02:00
committed by GitHub
parent 263d4c5325
commit 122a45a890
2 changed files with 9 additions and 14 deletions
+4 -8
View File
@@ -22,7 +22,7 @@ RUN bun run build:web
FROM base AS runtime
RUN pacman -Sy --noconfirm --needed base-devel python openssh cloudflared git nodejs npm && \
RUN pacman -Sy --noconfirm --needed base-devel python openssh cloudflared git nodejs npm less && \
pacman -Scc --noconfirm
ENV NODE_ENV=production
@@ -33,16 +33,12 @@ RUN useradd -m -s /bin/bash openchamber
# Switch to openchamber user
USER openchamber
RUN npm config set prefix /home/openchamber/.npm-global && mkdir -p /home/openchamber/.npm-global
ENV NPM_CONFIG_PREFIX=/home/openchamber/.npm-global
ENV PATH=${NPM_CONFIG_PREFIX}/bin:${PATH}
# Create necessary directories and set ownership
RUN mkdir -p /home/openchamber/.local /home/openchamber/.config /home/openchamber/.ssh
# Install npm packages as root
RUN npm install -g opencode-ai
RUN npm config set prefix /home/openchamber/.npm-global && mkdir -p /home/openchamber/.npm-global && \
mkdir -p /home/openchamber/.local /home/openchamber/.config /home/openchamber/.ssh && \
npm install -g opencode-ai
WORKDIR /home/openchamber
COPY --from=deps /app/node_modules ./node_modules
+5 -6
View File
@@ -63,15 +63,14 @@ if [ -n "${CF_TUNNEL:-}" ] && [ "${CF_TUNNEL:-false}" != "false" ]; then
fi
if [ "${OH_MY_OPENCODE:-false}" = "true" ]; then
echo "[entrypoint] npm installing oh-my-opencode..."
npm install -g oh-my-opencode
OMO_CONFIG_FILE="${OPENCODE_CONFIG_DIR}/oh-my-opencode.json"
OMO_INSTALL_ARGS="--no-tui --claude=no --openai=no --gemini=no --copilot=no --opencode-zen=no --zai-coding-plan=no --kimi-for-coding=no --skip-auth"
if [ ! -f "${OMO_CONFIG_FILE}" ]; then
echo "[entrypoint] npm installing oh-my-opencode..."
npm install -g oh-my-opencode
OMO_INSTALL_ARGS="--no-tui --claude=no --openai=no --gemini=no --copilot=no --opencode-zen=no --zai-coding-plan=no --kimi-for-coding=no --skip-auth"
echo "[entrypoint] oh-my-opencode installing..."
oh-my-opencode install ${OMO_INSTALL_ARGS}
fi