File size: 713 Bytes
05c76c0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
82473d7
05c76c0
 
82473d7
05c76c0
e2feace
05c76c0
e2feace
05c76c0
 
 
 
8f8742d
e2feace
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
FROM debian:12-slim  
  
# Set HOME environment variable  
ENV HOME=/root  
  
# Install runtime dependencies  
RUN apt-get update && apt-get install -y \  
    curl \  
    bash \  
    git \  
    ca-certificates \  
    && rm -rf /var/lib/apt/lists/*  
  
# Install OpenCode using the official installer  
RUN curl -fsSL https://opencode.ai/install | bash  
  

# Add OpenCode to PATH    
ENV PATH="$HOME/.opencode/bin:$PATH" 

# Copy your configuration files  
COPY entrypoint.sh /entrypoint.sh  
COPY opencode.json /opencode.json  
RUN chmod +x /entrypoint.sh  
  
ENV OPENCODE_SERVER_USERNAME=opencode  
EXPOSE 8860  
  
ENTRYPOINT ["/entrypoint.sh"]  
CMD ["web", "--port", "8860", "--hostname", "0.0.0.0"]