Upload Dockerfile with huggingface_hub
Browse files- Dockerfile +10 -4
Dockerfile
CHANGED
|
@@ -3,12 +3,15 @@ FROM node:22-slim
|
|
| 3 |
|
| 4 |
# 1. System deps (minimal)
|
| 5 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 6 |
-
python3 python3-pip ca-certificates curl \
|
| 7 |
&& rm -rf /var/lib/apt/lists/*
|
| 8 |
|
| 9 |
# 2. Install OpenClaw at build time (cached)
|
| 10 |
RUN npm install -g openclaw@latest --unsafe-perm --no-audit --no-fund
|
| 11 |
|
|
|
|
|
|
|
|
|
|
| 12 |
# ~/.openclaw/bin 已经在 PATH 中
|
| 13 |
|
| 14 |
# 3. Copy app files
|
|
@@ -17,15 +20,18 @@ COPY backup-manager.py .
|
|
| 17 |
COPY config-generator.py .
|
| 18 |
COPY start-openclaw.sh .
|
| 19 |
COPY scripts/ ./scripts/
|
|
|
|
| 20 |
RUN chmod +x start-openclaw.sh scripts/*.sh
|
| 21 |
|
| 22 |
# 4. Environment
|
| 23 |
-
ENV PORT=
|
|
|
|
| 24 |
OPENCLAW_STATE_DIR=/root/.openclaw \
|
| 25 |
HOME=/root \
|
| 26 |
NODE_OPTIONS=--max-old-space-size=512 \
|
| 27 |
NPM_CONFIG_REGISTRY=https://registry.npmmirror.com \
|
| 28 |
-
NODE_ENV=production
|
|
|
|
| 29 |
|
| 30 |
-
EXPOSE
|
| 31 |
CMD ["./start-openclaw.sh"]
|
|
|
|
| 3 |
|
| 4 |
# 1. System deps (minimal)
|
| 5 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 6 |
+
python3 python3-pip python3-requests ca-certificates curl \
|
| 7 |
&& rm -rf /var/lib/apt/lists/*
|
| 8 |
|
| 9 |
# 2. Install OpenClaw at build time (cached)
|
| 10 |
RUN npm install -g openclaw@latest --unsafe-perm --no-audit --no-fund
|
| 11 |
|
| 12 |
+
# 3. Install Caddy (reverse proxy)
|
| 13 |
+
RUN curl -fsSL https://caddy.org/install | bash
|
| 14 |
+
|
| 15 |
# ~/.openclaw/bin 已经在 PATH 中
|
| 16 |
|
| 17 |
# 3. Copy app files
|
|
|
|
| 20 |
COPY config-generator.py .
|
| 21 |
COPY start-openclaw.sh .
|
| 22 |
COPY scripts/ ./scripts/
|
| 23 |
+
COPY Caddyfile .
|
| 24 |
RUN chmod +x start-openclaw.sh scripts/*.sh
|
| 25 |
|
| 26 |
# 4. Environment
|
| 27 |
+
ENV PORT=7860 \
|
| 28 |
+
OPENCLAW_GATEWAY_PORT=18889 \
|
| 29 |
OPENCLAW_STATE_DIR=/root/.openclaw \
|
| 30 |
HOME=/root \
|
| 31 |
NODE_OPTIONS=--max-old-space-size=512 \
|
| 32 |
NPM_CONFIG_REGISTRY=https://registry.npmmirror.com \
|
| 33 |
+
NODE_ENV=production \
|
| 34 |
+
ALLOW_HTTP_BASIC_OVER_HTTP=1
|
| 35 |
|
| 36 |
+
EXPOSE 7860
|
| 37 |
CMD ["./start-openclaw.sh"]
|