Spaces:
Sleeping
Sleeping
| FROM ubuntu:22.04 | |
| # Set up environment | |
| ENV DEBIAN_FRONTEND=noninteractive | |
| RUN apt-get update && apt-get install -y wget ca-certificates curl | |
| # Create user and data directories | |
| RUN useradd -m -u 1000 user | |
| RUN mkdir -p /data/.cli-proxy-api && chown -R user:user /data | |
| # Download and install CLIProxyAPI | |
| RUN wget https://github.com/router-for-me/CLIProxyAPI/releases/download/v6.7.47/CLIProxyAPI_6.7.47_linux_amd64.tar.gz \ | |
| && tar -xzvf CLIProxyAPI_6.7.47_linux_amd64.tar.gz \ | |
| && mv cli-proxy-api /usr/local/bin/ \ | |
| && chmod +x /usr/local/bin/cli-proxy-api | |
| USER user | |
| WORKDIR /home/user | |
| # Copy your local config.yaml to the container | |
| COPY --chown=user:user config.yaml . | |
| EXPOSE 7860 | |
| # Start command | |
| CMD ["cli-proxy-api", "--config", "config.yaml"] |