abcd118q commited on
Commit
72efd81
·
verified ·
1 Parent(s): b3599ec

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +3 -4
Dockerfile CHANGED
@@ -6,6 +6,7 @@ RUN apt-get update && apt-get install -y \
6
  sudo \
7
  libgbm1 \
8
  libasound2 \
 
9
  # Standard Electron/IDE dependencies
10
  libnss3 \
11
  libxss1 \
@@ -19,9 +20,7 @@ USER root
19
 
20
  # 3. Copy and Install the .deb
21
  # Replace 'your_file_name.deb' with the actual name of your file
22
- COPY opencode.deb /tmp/opencode.deb
23
- RUN dpkg -i /tmp/opencode.deb || apt-get install -f -y
24
-
25
  # 4. Fix Permissions
26
  RUN chown -R user:user /home/user
27
 
@@ -34,4 +33,4 @@ WORKDIR $HOME/app
34
 
35
  # 6. THE FIX: We use a shell script to find the executable if 'opencode' isn't right
36
  # Most .deb IDEs install to /usr/bin/ or /opt/OpenCode/
37
- CMD ["sh", "-c", "opencode-desktop --host 0.0.0.0 --port 7860 || opencode --host 0.0.0.0 --port 7860 || /opt/OpenCode/opencode --host 0.0.0.0 --port 7860"]
 
6
  sudo \
7
  libgbm1 \
8
  libasound2 \
9
+ nodejs-lts \
10
  # Standard Electron/IDE dependencies
11
  libnss3 \
12
  libxss1 \
 
20
 
21
  # 3. Copy and Install the .deb
22
  # Replace 'your_file_name.deb' with the actual name of your file
23
+ RUN npm i -g opencode-ai
 
 
24
  # 4. Fix Permissions
25
  RUN chown -R user:user /home/user
26
 
 
33
 
34
  # 6. THE FIX: We use a shell script to find the executable if 'opencode' isn't right
35
  # Most .deb IDEs install to /usr/bin/ or /opt/OpenCode/
36
+ CMD ["opencode serve --port 7860 --hostname 0.0.0.0"]