Download Dockerfile from aappeekk/b: direct link, hf CLI and curl.
- Browser
- Download file 991 Bytes
-
https://huggingface.co/spaces/aappeekk/b/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/aappeekk/b/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/aappeekk/b/resolve/main/Dockerfile
991 Bytes
| FROM node:18-slim | |
| # 安装工具、Chrome 依赖以及 WebDAV 脚本需要的 lsof | |
| RUN apt-get update && apt-get install -y \ | |
| wget \ | |
| gnupg \ | |
| ca-certificates \ | |
| procps \ | |
| chromium \ | |
| chromium-sandbox \ | |
| git \ | |
| fonts-noto-cjk \ | |
| python3 \ | |
| python3-pip \ | |
| lsof \ | |
| && apt-get clean | |
| # 克隆 Koishi 仓库 | |
| RUN git clone https://github.com/xhzngm/boilerplate.git /app | |
| WORKDIR /app | |
| # 安装 Koishi 依赖 | |
| RUN corepack enable && yarn install | |
| # 安装 Python WebDAV 客户端 | |
| # 注意:这里直接安装到系统环境(--break-system-packages),对应脚本中的 python3 路径 | |
| RUN pip3 install --break-system-packages webdavclient3 requests | |
| # 修改权限 | |
| RUN chmod -R 777 /app | |
| # 设置环境变量 | |
| ENV CHROME_PATH=/usr/bin/chromium | |
| # 这里的端口必须与 readme.MD 中的 app_port 保持一致 | |
| EXPOSE 5140 | |
| # 添加并授权同步脚本 | |
| COPY sync_data.sh /sync_data.sh | |
| RUN chmod +x /sync_data.sh | |
| # 启动命令 | |
| CMD ["bash", "/sync_data.sh"] |