habppyar commited on
Commit
af87faa
·
verified ·
1 Parent(s): 6ae096b

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -9
Dockerfile CHANGED
@@ -5,18 +5,16 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
5
  ca-certificates curl bash \
6
  && rm -rf /var/lib/apt/lists/*
7
 
8
- # 安装 OpenCode(官方脚本)
9
- USER node
10
- ENV HOME=/home/node
11
- WORKDIR /home/node/app
12
 
 
13
  RUN curl -fsSL https://opencode.ai/install | bash
14
 
15
- # 关键:不要依赖 .bashrc,直接把 opencode 放进 PATH(解决 opencode: not found)
16
- ENV PATH="/home/node/.opencode/bin:${PATH}"
17
 
18
- COPY --chown=node:node . /home/node/app
19
- RUN chmod +x /home/node/app/start.sh
20
 
21
  EXPOSE 7860
22
- CMD ["bash", "-lc", "/home/node/app/start.sh"]
 
5
  ca-certificates curl bash \
6
  && rm -rf /var/lib/apt/lists/*
7
 
8
+ WORKDIR /app
 
 
 
9
 
10
+ # Install OpenCode (official install script)
11
  RUN curl -fsSL https://opencode.ai/install | bash
12
 
13
+ # Don't rely on .bashrc; make opencode available in non-interactive shells
14
+ ENV PATH="/root/.opencode/bin:${PATH}"
15
 
16
+ COPY . /app
17
+ RUN chmod +x /app/start.sh
18
 
19
  EXPOSE 7860
20
+ CMD ["bash", "-lc", "/app/start.sh"]