| 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"] | |