MD Mahadi commited on
Commit
3044e64
·
verified ·
1 Parent(s): 03727e4

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +3 -1
Dockerfile CHANGED
@@ -27,6 +27,7 @@ RUN ln -sf /usr/bin/python3 /usr/bin/python
27
 
28
  # Install @opencode/cli globally
29
  RUN npm install -g @opencode/cli
 
30
  RUN npm install -g heroku
31
 
32
  # Point HOME, XDG, npm cache, and pip directories to /data for full persistence
@@ -47,4 +48,5 @@ WORKDIR /data/workspace
47
  EXPOSE 7860
48
 
49
  # Fix ownership of /data at startup and start OpenCode server
50
- CMD ["sh", "-c", "sudo chown -R user:user /data && mkdir -p /data/workspace /data/.config/opencode /data/.local/share /data/.local/state /data/.cache /data/.npm /data/.local/bin && opencode serve --hostname 0.0.0.0 --port 7860"]
 
 
27
 
28
  # Install @opencode/cli globally
29
  RUN npm install -g @opencode/cli
30
+ # Heroku CLI
31
  RUN npm install -g heroku
32
 
33
  # Point HOME, XDG, npm cache, and pip directories to /data for full persistence
 
48
  EXPOSE 7860
49
 
50
  # Fix ownership of /data at startup and start OpenCode server
51
+ # Fix ownership using numeric UID/GID (1000:1000) and start OpenCode server
52
+ CMD ["sh", "-c", "chown -R 1000:1000 /data && mkdir -p /data/workspace /data/.config/opencode /data/.local/share /data/.local/state /data/.cache /data/.npm /data/.local/bin && opencode serve --hostname 0.0.0.0 --port 7860"]