MD Mahadi commited on
Commit
4220282
·
verified ·
1 Parent(s): 7490a8a

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +3 -3
Dockerfile CHANGED
@@ -24,7 +24,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
24
  # Create symlink so 'python' command points to 'python3'
25
  RUN ln -sf /usr/bin/python3 /usr/bin/python
26
 
27
- # Install OpenCode CLI globally
28
  RUN npm install -g @opencode/cli
29
 
30
  # Point HOME, XDG, npm cache, and pip directories to /data for full persistence
@@ -44,5 +44,5 @@ WORKDIR /data/workspace
44
  # Hugging Face default port
45
  EXPOSE 7860
46
 
47
- # Ensure persistent directories exist, set permissions, and start OpenCode
48
- CMD ["sh", "-c", "mkdir -p /data/workspace /data/.config /data/.local/share /data/.local/state /data/.cache /data/.npm /data/.local/bin && chmod -R 777 /data && opencode web --hostname 0.0.0.0 --port 7860"]
 
24
  # Create symlink so 'python' command points to 'python3'
25
  RUN ln -sf /usr/bin/python3 /usr/bin/python
26
 
27
+ # Install @opencode/cli globally
28
  RUN npm install -g @opencode/cli
29
 
30
  # Point HOME, XDG, npm cache, and pip directories to /data for full persistence
 
44
  # Hugging Face default port
45
  EXPOSE 7860
46
 
47
+ # Start OpenCode v2 API & web server with --auto flag for automatic permission approval
48
+ CMD ["sh", "-c", "mkdir -p /data/workspace /data/.config /data/.local/share /data/.local/state /data/.cache /data/.npm /data/.local/bin && chmod -R 777 /data && opencode serve --auto --hostname 0.0.0.0 --port 7860"]