Spaces:
Running
Running
| FROM ghcr.io/liuw1535/antigravity2api-nodejs:latest | |
| USER root | |
| # 安装 Node.js (以安装 Node 18 为例) | |
| RUN apt-get update && apt-get install -y \ | |
| curl \ | |
| gnupg \ | |
| && curl -fsSL https://deb.nodesource.com/setup_18.x | bash - \ | |
| && apt-get install -y nodejs \ | |
| && apt-get clean \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # 设置端口 | |
| ENV PORT=7860 | |
| # 后续的权限设置 | |
| RUN mkdir -p /app/data && chown -R 1000:1000 /app | |
| USER 1000 | |
| EXPOSE 7860 | |
| CMD ["sh", "-c", "export PROXY_ENV=1 && mkdir -p /app/data && echo \"$ACCOUNTS_JSON\" > /app/data/accounts.json && echo '{\"server\":{\"port\":7860,\"host\":\"0.0.0.0\"}}' > /app/config.json && /app/entrypoint.sh"] |