File size: 438 Bytes
266dd51
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
FROM ubuntu:22.04

# Install dependencies
RUN apt-get update && apt-get install -y curl bash

# Install opencode.ai
RUN curl -fsSL https://opencode.ai/install | bash

# Ensure opencode is in PATH
ENV PATH="/root/.opencode/bin:${PATH}"

# Expose the port opencode web uses (default 4096)
EXPOSE 7860

# Run opencode web on port 7860 (HF Space default) and bind to 0.0.0.0
CMD ["opencode", "web", "--port", "7860", "--hostname", "0.0.0.0"]