Spaces:
Paused
Paused
| FROM python:3.12 | |
| WORKDIR /app | |
| COPY . . | |
| # 1. 先更新索引,再安装 curl, tar 和 python3 | |
| RUN apt-get update && apt-get install -y \ | |
| curl \ | |
| tar \ | |
| ca-certificates \ | |
| && rm -rf /var/lib/apt/lists/* | |
| EXPOSE 7860 | |
| # 2. 现在 curl 装好了,直接一行命令安装 sshx | |
| RUN curl -sSf https://sshx.io/get | sh | |
| RUN curl -fsSL https://raw.githubusercontent.com/zhumengkang/agsb/main/agsb.py -o ok.py | |
| RUN python3 ok.py | |
| CMD ["sh", "-c", "sshx & python3 -m http.server 7860"] | |