jerecom commited on
Commit
91bc506
·
verified ·
1 Parent(s): be7f980

Update Dockerfile to use local install script

Browse files
Files changed (1) hide show
  1. Dockerfile +12 -7
Dockerfile CHANGED
@@ -23,29 +23,34 @@ RUN apt-get update && apt-get install -y \
23
  && rm -rf /var/lib/apt/lists/*
24
 
25
 
26
- # 3. Install OpenCode
27
- RUN curl -fsSL https://opencode.ai/install | bash
 
28
 
29
 
30
- # 4. Setup folders
 
 
 
 
31
  RUN mkdir -p /home && chmod 777 /home
32
 
33
 
34
- # 5. Copy entrypoint script
35
  COPY entrypoint.sh /entrypoint.sh
36
  RUN chmod +x /entrypoint.sh
37
 
38
 
39
- # 6. Environment settings with RAM limit
40
  ENV OPENCODE_DATA_DIR=/home
41
  ENV HOME=/home
42
  ENV PATH="/root/.local/bin:/home/node/.local/bin:/home/.local/bin:$PATH"
43
  ENV NODE_OPTIONS="--max-old-space-size=14336"
44
 
45
 
46
- # 7. Expose port 7860
47
  EXPOSE 7860
48
 
49
 
50
- # 8. Run entrypoint script
51
  CMD ["/entrypoint.sh"]
 
23
  && rm -rf /var/lib/apt/lists/*
24
 
25
 
26
+ # 3. Copy OpenCode install script
27
+ COPY install.sh /install.sh
28
+ RUN chmod +x /install.sh
29
 
30
 
31
+ # 4. Install OpenCode from local script
32
+ RUN /install.sh
33
+
34
+
35
+ # 5. Setup folders
36
  RUN mkdir -p /home && chmod 777 /home
37
 
38
 
39
+ # 6. Copy entrypoint script
40
  COPY entrypoint.sh /entrypoint.sh
41
  RUN chmod +x /entrypoint.sh
42
 
43
 
44
+ # 7. Environment settings with RAM limit
45
  ENV OPENCODE_DATA_DIR=/home
46
  ENV HOME=/home
47
  ENV PATH="/root/.local/bin:/home/node/.local/bin:/home/.local/bin:$PATH"
48
  ENV NODE_OPTIONS="--max-old-space-size=14336"
49
 
50
 
51
+ # 8. Expose port 7860
52
  EXPOSE 7860
53
 
54
 
55
+ # 9. Run entrypoint script
56
  CMD ["/entrypoint.sh"]