NasarDope commited on
Commit
4f3f3ba
·
verified ·
1 Parent(s): d213b84

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +10 -7
Dockerfile CHANGED
@@ -1,13 +1,16 @@
1
- # Official 2026 OpenCode Engine
2
- FROM ghcr.io/anomalyco/opencode:latest
3
 
4
  USER root
5
- # Create the project directory and force permissions
6
- RUN mkdir -p /home/user/app/my_coding_project && chmod -R 777 /home/user/app
7
  WORKDIR /home/user/app
8
 
9
- ENV PORT=7860 HOME=/home/user
 
 
 
 
 
10
  EXPOSE 7860
11
 
12
- # The '.' at the end is the 'Positionals' it is asking for in your screenshot
13
- CMD ["opencode", "web", "--host", "0.0.0.0", "--port", "7860", "--no-auth", "."]
 
1
+ FROM ghcr.io/opencode/opencode:latest
 
2
 
3
  USER root
4
+ RUN mkdir -p /home/user/app && chmod -R 777 /home/user/app
 
5
  WORKDIR /home/user/app
6
 
7
+ # Set required environment variables for 2026
8
+ ENV PORT=7860 \
9
+ OPENCODE_HOST=0.0.0.0 \
10
+ OPENCODE_PORT=7860 \
11
+ OPENCODE_AUTH=false
12
+
13
  EXPOSE 7860
14
 
15
+ # We use the 'serve' command instead of 'web' for the latest stable build
16
+ CMD ["opencode", "serve", "--host", "0.0.0.0", "--port", "7860", "."]