Spaces:
Paused
Paused
| FROM ubuntu:22.04 | |
| ENV DEBIAN_FRONTEND=noninteractive | |
| RUN apt-get update && apt-get install -y \ | |
| curl \ | |
| wget \ | |
| ca-certificates \ | |
| && rm -rf /var/lib/apt/lists/* | |
| RUN wget -O /usr/local/bin/opencode2api \ | |
| https://github.com/dsadsadsss/Opencodeai/releases/download/2/opencode2api-linux-amd64 \ | |
| && chmod +x /usr/local/bin/opencode2api | |
| RUN cat > /start.sh << 'EOF' | |
| #!/bin/bash | |
| set -e | |
| echo "[1/2] Starting opencode2api on :7860 ..." | |
| /usr/local/bin/opencode2api --password "$PASSWORD" --port 7860 | |
| EOF | |
| RUN chmod +x /start.sh | |
| EXPOSE 7860 | |
| CMD ["/start.sh"] |