Download Dockerfile from laalucas/singbox: direct link, hf CLI and curl.
- Browser
- Download file 830 Bytes
-
https://huggingface.co/spaces/laalucas/singbox/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/laalucas/singbox/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/laalucas/singbox/resolve/main/Dockerfile
830 Bytes
| FROM alpine:latest | |
| # 安装依赖 | |
| RUN apk add --no-cache curl wget bash coreutils nodejs npm net-tools iproute2 git | |
| # 创建普通用户 lucas | |
| RUN addgroup -g 1000 lucas \ | |
| && adduser -D -u 1000 -G lucas -s /bin/bash lucas | |
| # 创建工作目录并赋权 | |
| RUN mkdir -p /app/html /app/logs \ | |
| && chown -R lucas:lucas /app | |
| WORKDIR /usr/local/bin | |
| # 下载 sing-box 和 cloudflared | |
| RUN curl -LOs https://github.com/lucas8864/sing-box-docker/raw/refs/heads/main/sing-box \ | |
| && curl -LOs https://github.com/lucas8864/sing-box-docker/raw/refs/heads/main/cloudflared \ | |
| && chmod +x sing-box cloudflared | |
| WORKDIR /app | |
| # 拷贝脚本和 Node 服务 | |
| COPY deploy.sh /app/deploy.sh | |
| COPY server.js /app/server.js | |
| RUN chmod +x deploy.sh \ | |
| && chown -R lucas:lucas /app | |
| USER lucas | |
| ENV PORT=7860 | |
| CMD ["bash", "/app/deploy.sh"] |