Download Dockerfile from cefrefdwe/warp-proxy-test-1769392021: direct link, hf CLI and curl.
- Browser
- Download file 1.63 kB
-
https://huggingface.co/spaces/cefrefdwe/warp-proxy-test-1769392021/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/cefrefdwe/warp-proxy-test-1769392021/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/cefrefdwe/warp-proxy-test-1769392021/resolve/main/Dockerfile
1.63 kB
| # AdFoc 自动化容器 - 带 Playwright 和代理支持 | |
| FROM python:3.9-slim | |
| # 设置工作目录 | |
| WORKDIR /app | |
| # 安装系统依赖 | |
| RUN apt-get update && apt-get install -y \ | |
| supervisor \ | |
| curl \ | |
| wget \ | |
| gnupg \ | |
| tor \ | |
| # Playwright 依赖 | |
| libnss3 \ | |
| libnspr4 \ | |
| libatk1.0-0 \ | |
| libatk-bridge2.0-0 \ | |
| libcups2 \ | |
| libdrm2 \ | |
| libdbus-1-3 \ | |
| libxkbcommon0 \ | |
| libatspi2.0-0 \ | |
| libxcomposite1 \ | |
| libxdamage1 \ | |
| libxfixes3 \ | |
| libxrandr2 \ | |
| libgbm1 \ | |
| libasound2 \ | |
| libpango-1.0-0 \ | |
| libcairo2 \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # 创建普通用户(避免 Root 检测) | |
| RUN useradd -m -u 1000 user | |
| USER user | |
| ENV PATH="/home/user/.local/bin:$PATH" | |
| ENV HOME="/home/user" | |
| # 复制依赖文件 | |
| COPY --chown=user requirements.txt . | |
| # 安装 Python 依赖 | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # 切换回普通用户 | |
| USER user | |
| # 安装 Playwright 浏览器 | |
| RUN playwright install chromium | |
| # 切换回 Root 安装系统级工具 | |
| USER root | |
| # 安装 wireproxy 到 /usr/local/bin | |
| RUN curl -fL -o wireproxy.tar.gz https://github.com/pufferffish/wireproxy/releases/download/v1.0.9/wireproxy_linux_amd64.tar.gz \ | |
| && tar -xzf wireproxy.tar.gz \ | |
| && mv wireproxy /usr/local/bin/ \ | |
| && rm wireproxy.tar.gz \ | |
| && chmod +x /usr/local/bin/wireproxy \ | |
| && wireproxy --version || echo "wireproxy version check failed or not supported" | |
| # 切换回普通用户 | |
| USER user | |
| # 复制代码 | |
| COPY --chown=user . . | |
| # 暴露端口 | |
| EXPOSE 7860 | |
| # 启动 Supervisor | |
| RUN echo "Rebuild 2026-01-26-0445" | |
| CMD ["supervisord", "-c", "supervisord.conf"] | |