Download Dockerfile from a79520/webos: direct link, hf CLI and curl.
- Browser
- Download file 1.26 kB
-
https://huggingface.co/spaces/a79520/webos/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/a79520/webos/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/a79520/webos/resolve/main/Dockerfile
1.26 kB
| FROM eclipse-temurin:8-jre-focal | |
| # ---------- 基础工具 ---------- | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| unzip \ | |
| curl wget \ | |
| procps \ | |
| socat \ | |
| ca-certificates \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # ---------- 准备目录 ---------- | |
| RUN mkdir -p /webos && \ | |
| chmod 755 /webos | |
| WORKDIR /webos | |
| # ---------- 下载安装包 ---------- | |
| # 说明:如果该 URL 返回 php 源码/403,就说明它需要鉴权/不可直链。 | |
| # 那时你应该把 webos.zip 放到仓库里(或私密拉取),并把下面换成 COPY webos.zip /webos/webos.zip | |
| RUN wget --no-check-certificate -nv \ | |
| "https://support.tenfell.cn/webos_update/php/index.php?type=8&m=1" \ | |
| -O /webos/webos.zip \ | |
| && unzip -o /webos/webos.zip -d /webos/ \ | |
| && rm -f /webos/webos.zip | |
| # 让 api 目录的启动脚本可见/可执行(按你原逻辑) | |
| RUN if [ -f /webos/api/restart.sh ]; then chmod +x /webos/api/restart.sh; fi | |
| # ---------- HF 需要非 root uid=1000 能写 ---------- | |
| RUN useradd -m -u 1000 appuser || true | |
| RUN chown -R 1000:1000 /webos | |
| USER 1000 | |
| WORKDIR /webos/api | |
| # ---------- 启动入口 ---------- | |
| COPY --chown=1000:1000 entrypoint.sh /entrypoint.sh | |
| RUN chmod +x /entrypoint.sh | |
| ENTRYPOINT ["/entrypoint.sh"] |