tanbushi commited on
Commit
a3c641f
·
1 Parent(s): abe8684
Files changed (1) hide show
  1. Dockerfile +6 -4
Dockerfile CHANGED
@@ -11,8 +11,10 @@ RUN apk add --no-cache git curl
11
  # Create app directory
12
  WORKDIR /app
13
 
14
- # Install opencode globally
15
- RUN npm install -g opencode-ai@latest
 
 
16
 
17
  # Create a non-root user
18
  RUN addgroup -g 1001 -S opencode && \
@@ -43,5 +45,5 @@ echo "OpenAPI documentation available at http://0.0.0.0:7860/doc"\n\
43
  exec opencode serve --hostname 0.0.0.0 --port 7860\n\
44
  ' > /home/opencode/start.sh && chmod +x /home/opencode/start.sh
45
 
46
- # Default command - start web server directly with full path
47
- CMD ["/usr/local/bin/opencode", "serve", "--hostname", "0.0.0.0", "--port", "7860"]
 
11
  # Create app directory
12
  WORKDIR /app
13
 
14
+ # Install opencode globally and verify location
15
+ RUN npm install -g opencode-ai@latest && \
16
+ which opencode && \
17
+ ls -la $(which opencode)
18
 
19
  # Create a non-root user
20
  RUN addgroup -g 1001 -S opencode && \
 
45
  exec opencode serve --hostname 0.0.0.0 --port 7860\n\
46
  ' > /home/opencode/start.sh && chmod +x /home/opencode/start.sh
47
 
48
+ # Default command - start web server with npm
49
+ CMD ["npm", "exec", "opencode", "serve", "--hostname", "0.0.0.0", "--port", "7860"]