Download Dockerfile from meipv/pv: direct link, hf CLI and curl.
- Browser
- Download file 643 Bytes
-
https://huggingface.co/spaces/meipv/pv/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/meipv/pv/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/meipv/pv/resolve/main/Dockerfile
643 Bytes
| FROM alpine:latest | |
| RUN apk add --no-cache curl unzip gettext # 安装 gettext 用于替换变量 | |
| WORKDIR /app | |
| # 伪装下载:下载 xray 并改名为 myapp | |
| RUN curl -L -H "User-Agent: Mozilla/5.0" -o data.zip https://github.com/XTLS/Xray-core/releases/download/v26.4.17/Xray-linux-64.zip && \ | |
| unzip data.zip && \ | |
| mv xray myapp && \ | |
| rm -f data.zip && \ | |
| chmod +x myapp | |
| # 复制一个模板文件 | |
| COPY config.template.json /app/config.template.json | |
| # 启动时:用环境变量替换模板,生成真正的 config.json,然后运行 | |
| CMD envsubst < /app/config.template.json > /app/config.json && ./myapp run -c config.json |