Update Dockerfile
Browse files- Dockerfile +4 -33
Dockerfile
CHANGED
|
@@ -1,56 +1,27 @@
|
|
| 1 |
-
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 2 |
-
# OpenClaw for HuggingFace Spaces
|
| 3 |
-
# Method: npm install -g openclaw (same approach as Tonic/hugging-claw)
|
| 4 |
-
# /app/package.json does NOT exist β HF scanner finds nothing
|
| 5 |
-
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 6 |
-
|
| 7 |
FROM node:24-slim
|
| 8 |
|
| 9 |
-
# Install system dependencies
|
| 10 |
-
# python3/make/g++ are needed to compile native npm modules
|
| 11 |
RUN apt-get update && apt-get install -y \
|
| 12 |
-
|
| 13 |
-
ca-certificates \
|
| 14 |
-
curl \
|
| 15 |
-
netcat-openbsd \
|
| 16 |
-
git \
|
| 17 |
-
python3 \
|
| 18 |
-
make \
|
| 19 |
-
g++ \
|
| 20 |
--no-install-recommends && \
|
| 21 |
rm -rf /var/lib/apt/lists/*
|
| 22 |
|
| 23 |
-
# Make git fetch dependencies over https instead of ssh
|
| 24 |
RUN git config --global url."https://github.com/".insteadOf ssh://git@github.com/ && \
|
| 25 |
git config --global url."https://github.com/".insteadOf git@github.com:
|
| 26 |
|
| 27 |
-
# To pin a version, change "latest" to e.g. 2026.x.x
|
| 28 |
ARG OPENCLAW_VERSION=2026.9.7
|
| 29 |
-
|
| 30 |
-
# Install OpenClaw globally via npm
|
| 31 |
-
# Installs to /usr/local/lib/node_modules/openclaw β NOT /app
|
| 32 |
-
# So /app/package.json will never exist in this image
|
| 33 |
RUN npm config set fetch-retries 5 && \
|
| 34 |
npm config set fetch-retry-mintimeout 20000 && \
|
| 35 |
npm install -g openclaw@${OPENCLAW_VERSION} --no-audit --no-fund
|
| 36 |
|
| 37 |
-
|
| 38 |
-
RUN rm -f /etc/nginx/sites-enabled/default \
|
| 39 |
-
/etc/nginx/sites-available/default
|
| 40 |
-
|
| 41 |
-
# Copy only our own Space files into /app (none of them have baileys)
|
| 42 |
-
RUN mkdir -p /app/spaces/huggingface
|
| 43 |
|
| 44 |
COPY openclaw.json /app/openclaw-template.json
|
| 45 |
COPY setup-hf-config.mjs /app/spaces/huggingface/setup-hf-config.mjs
|
| 46 |
COPY entrypoint.sh /app/entrypoint.sh
|
| 47 |
COPY security-check.sh /app/security-check.sh
|
| 48 |
-
COPY
|
| 49 |
-
COPY start.sh /app/start.sh
|
| 50 |
|
| 51 |
-
RUN chmod +x /app/entrypoint.sh /app/security-check.sh
|
| 52 |
-
mkdir -p /data && chmod 777 /data && \
|
| 53 |
-
mkdir -p /home/user && chmod 777 /home/user
|
| 54 |
|
| 55 |
USER root
|
| 56 |
EXPOSE 7860
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
FROM node:24-slim
|
| 2 |
|
|
|
|
|
|
|
| 3 |
RUN apt-get update && apt-get install -y \
|
| 4 |
+
ca-certificates curl netcat-openbsd git python3 make g++ \
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
--no-install-recommends && \
|
| 6 |
rm -rf /var/lib/apt/lists/*
|
| 7 |
|
|
|
|
| 8 |
RUN git config --global url."https://github.com/".insteadOf ssh://git@github.com/ && \
|
| 9 |
git config --global url."https://github.com/".insteadOf git@github.com:
|
| 10 |
|
|
|
|
| 11 |
ARG OPENCLAW_VERSION=2026.9.7
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
RUN npm config set fetch-retries 5 && \
|
| 13 |
npm config set fetch-retry-mintimeout 20000 && \
|
| 14 |
npm install -g openclaw@${OPENCLAW_VERSION} --no-audit --no-fund
|
| 15 |
|
| 16 |
+
RUN mkdir -p /app/spaces/huggingface /home/user && chmod 777 /home/user
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
|
| 18 |
COPY openclaw.json /app/openclaw-template.json
|
| 19 |
COPY setup-hf-config.mjs /app/spaces/huggingface/setup-hf-config.mjs
|
| 20 |
COPY entrypoint.sh /app/entrypoint.sh
|
| 21 |
COPY security-check.sh /app/security-check.sh
|
| 22 |
+
COPY tg-net-fix.cjs /app/tg-net-fix.cjs
|
|
|
|
| 23 |
|
| 24 |
+
RUN chmod +x /app/entrypoint.sh /app/security-check.sh
|
|
|
|
|
|
|
| 25 |
|
| 26 |
USER root
|
| 27 |
EXPOSE 7860
|