8900 commited on
Commit
ecf12f6
·
verified ·
1 Parent(s): 0cd23cb

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +3 -9
Dockerfile CHANGED
@@ -9,12 +9,11 @@ RUN apt-get update && \
9
  curl -fsSL https://bun.sh/install | bash
10
 
11
  ENV PATH="/root/.bun/bin:${PATH}"
12
-
13
  RUN corepack enable
14
 
15
  WORKDIR /app
16
 
17
- # 克隆 + 安装 + build + UI build (预构建核心)
18
  RUN git clone --depth 1 --branch "${OPENCLAW_REF}" "${OPENCLAW_REPO}" . && \
19
  pnpm install --frozen-lockfile && \
20
  pnpm build && \
@@ -23,20 +22,15 @@ RUN git clone --depth 1 --branch "${OPENCLAW_REF}" "${OPENCLAW_REPO}" . && \
23
  ENV OPENCLAW_PREFER_PNPM=1
24
  ENV NODE_ENV=production
25
 
26
- # COPY 本地 setup-hf-config.mjs 和 entrypoint.sh
27
- # 注意 entrypoint.sh 内部将调用 /app/setup-hf-config.mjs
28
  COPY setup-hf-config.mjs /app/setup-hf-config.mjs
29
  COPY entrypoint.sh /app/entrypoint.sh
30
  RUN chmod +x /app/entrypoint.sh
31
 
32
- # 权限设置
33
- RUN chown -R node:node /app && \
34
- mkdir -p /home/user && \
35
- chown -R node:node /home/user
36
 
37
  USER node
38
 
39
  EXPOSE 7860
40
 
41
- # ENTRYPOINT 保持不变,执行 entrypoint.sh
42
  ENTRYPOINT ["/app/entrypoint.sh"]
 
9
  curl -fsSL https://bun.sh/install | bash
10
 
11
  ENV PATH="/root/.bun/bin:${PATH}"
 
12
  RUN corepack enable
13
 
14
  WORKDIR /app
15
 
16
+ # 克隆并构建
17
  RUN git clone --depth 1 --branch "${OPENCLAW_REF}" "${OPENCLAW_REPO}" . && \
18
  pnpm install --frozen-lockfile && \
19
  pnpm build && \
 
22
  ENV OPENCLAW_PREFER_PNPM=1
23
  ENV NODE_ENV=production
24
 
25
+ # 复制我们的配置文件
 
26
  COPY setup-hf-config.mjs /app/setup-hf-config.mjs
27
  COPY entrypoint.sh /app/entrypoint.sh
28
  RUN chmod +x /app/entrypoint.sh
29
 
30
+ RUN chown -R node:node /app && mkdir -p /home/user && chown -R node:node /home/user
 
 
 
31
 
32
  USER node
33
 
34
  EXPOSE 7860
35
 
 
36
  ENTRYPOINT ["/app/entrypoint.sh"]